Many thanks for your response. I've not been online for a while so apologies for not responding sooner.
The following is a code sample copied from Microsoft documentation (reference ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_raddata/html/8a929e96-2cf5-43a5-b5b7-c0a5a397bbc5.htm)
Imports Microsoft.VisualBasic
Public Class Class3
Dim sqlConnection1 As New System.Data.SqlClient.SqlConnection("ReservationsDBConnectionString")
Dim cmd As New System.Data.SqlClient.SqlCommand
Dim rowsAffected As Integer
cmd.CommandText = "StoredProcedureName"
cmd.CommandType = CommandType.StoredProcedure
cmd.Connection = sqlConnection1
sqlConnection1.Open()
rowsAffected = cmd.ExecuteNonQuery()
sqlConnection1.Close()
End Class
I get the error "Declaration expected" for each of the 6 lines before the End Class line. I am clearly missing something terribly simple!