Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default user form error 9

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default user form error 9

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
User form error when opened theguz Excel Programming 3 October 24th 05 01:09 PM
Time error in user form bern Excel Programming 1 September 20th 05 12:49 AM
User Form Error theguz[_5_] Excel Programming 3 August 16th 05 07:58 PM
User Form Error theguz Excel Discussion (Misc queries) 3 August 15th 05 10:49 PM
Run Time Error 424 Combo Box User Form Jennifer Excel Programming 3 April 7th 05 08:23 PM


All times are GMT +1. The time now is 11:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"