Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I use the following code to control program flow on startup. It works fine on
2 other PCs (and worked on my PC last week), but (now) I get "run-time error '9': Subscript out of range" when it runs on my PC. Any ideas what might be different between the two PCs that causes it to bomb? I have tried rebooting and compared vba references between the two PCs -can't see anything obvious. Would appreciate any suggestions. ***** Sub Workbook_Open() If WorkbookExists("UPE_Period.xls") Then BuildALL Else Sheets("Reports").Select End If End Sub ****** Public Function WorkbookExists(WorkbookName As String) As Boolean On Error Resume Next If Application.Workbooks(WorkbookName) Is Nothing Then WorkbookExists = False Else WorkbookExists = True End If End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
run-time error '9': subscript out of range | Excel Discussion (Misc queries) | |||
Run time error-subscript out of range | Excel Programming | |||
Run-time error 9 (Subscript out of range) | Excel Programming | |||
Run time error 9 : Subscript out of range | Excel Discussion (Misc queries) | |||
Run time error '9' Subscript out of range | Excel Programming |