Error indexing worksheet

N

NewToVB

Can anyone tell me why I'm getting an error here? I'm using Visual Studio
2005

Dim LCV = New Excel._ExcelApplication
LCV = CreateObject("Excel.Application")
Dim LCVWkbk As Excel.Workbook

LCVWkbk = LCV.Workbooks.Open("C:\Documents and Settings\temp.xls")
LCV.Visible = True

Dim LCVSheet As Excel.Worksheet = LCVWkbk.Sheets(1)

I have an error here ^ saying COMException unhandled
 

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