Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ok, i've got a workbook that i've just added a user form to, everything
works fine for a while, then, seemingly at random i start getting error 9 subscript out of range messages when trying to show the form. i'm still working on the programming of the form itself, but none of the programming in the main module changes from when it works to when it starts giving the errors. is it possible that the changes i'm making in the form code is causing the error. and does anyone have any idea how i could fix this? the code for launching the form, which is what keeps coming up highlighted when you click on debug is Sub opentimesheetform() TimeSheetForm.Show End Sub with the TimeSheetForm.Show line being highlighted. I can put more of the code up if that would help. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Subscript out of range is associate with the error 9. That usually refers
to the sheet name or a workbook name. If you have something like Worksheets("Sheet1").Range("A1:F9") then that "Sheet1" is constant - it doesn't adjust if you change the sheet name. Check such references in your code. Also be aware that a sheet tab name may have a space at the end that makes it hard to recognize that the names don't match. If you are using arrays in your userform code, then this is another place to look. -- Regards, Tom Ogilvy "Craig" wrote in message oups.com... ok, i've got a workbook that i've just added a user form to, everything works fine for a while, then, seemingly at random i start getting error 9 subscript out of range messages when trying to show the form. i'm still working on the programming of the form itself, but none of the programming in the main module changes from when it works to when it starts giving the errors. is it possible that the changes i'm making in the form code is causing the error. and does anyone have any idea how i could fix this? the code for launching the form, which is what keeps coming up highlighted when you click on debug is Sub opentimesheetform() TimeSheetForm.Show End Sub with the TimeSheetForm.Show line being highlighted. I can put more of the code up if that would help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
User form error when opened | Excel Programming | |||
Time error in user form | Excel Programming | |||
User Form Error | Excel Programming | |||
User Form Error | Excel Discussion (Misc queries) | |||
Run Time Error 424 Combo Box User Form | Excel Programming |