ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Error indexing worksheet (https://www.excelbanter.com/excel-programming/393629-error-indexing-worksheet.html)

NewToVB

Error indexing worksheet
 
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



All times are GMT +1. The time now is 05:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com