Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Trying to write a class wrapper to handle calls to excel object model via
vb6. 'in cls Private moExcelApp as Excel.Application Private moWorkBook as Workbook 'FullPath = "Z:\0\0code\vb\excel\TestBook.xls" Public Sub OpenWorkBook(FullPathName as String) Dim fName as String fName = FileNameOnly(FullPathName) 'fName = "TestBook" If FileExists(FullPathName) Then moExcelApp.WorkBooks.Open FullPathName ' subscript out of range error here Set moWorkBook = moExcelApp.WorkBooks.Item(fName) Else LogError "File not found " & FullPathName End If I thought one could use a name as index to .Item property what am I doing wrong? Thanks Mark |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Setting up a list where an item can only be picked once in Excel | Excel Worksheet Functions | |||
Workbooks, subscript out of range | Excel Programming | |||
"Subscript out of range" error for: Workbooks("Test1.xls").Save | Excel Programming | |||
Setting Onaction for File Save on Menu bar using item or index numbers | Excel Programming | |||
Setting OnAction of custom menu item? | Excel Programming |