Perplexing Error

S

scorpion53061

I installed Office 2003 Pro this morning....this worked in Excel XP....

This error resulted from a vb.net(VS2003) project....

An unhandled exception of type 'System.MissingMemberException' occurred in
microsoft.visualbasic.dll

Additional information: Public member 'xlCmdType' on type 'ApplicationClass'
not found.

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button4.Click
Dim Excel As New Excel.Application
Dim oBook As Excel.Workbook
Dim WSheet As New Excel.Worksheet
WSheet = Excel.Workbooks.Add.Worksheets.Add
Excel.Visible = True
Dim qry As Excel.QueryTable 'query table object
qry =
WSheet.QueryTables.Add("OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Neumann Plumbing and Heating\Neumannpl.mdb", WSheet.Range("A1"))
With qry
.CommandType = Excel.xlCmdType.xlCmdTable
.CommandText = "ITEMS"
.Refresh(BackgroundQuery:=False)
End With

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top