Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating new option for excel program

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am a first time VB user. I am trying to incorporate and new product into an excel existing program.
The error I recieve when running the macro is Subscriot out of range. What does that mean?


This is the code which it highlights when debugging.
ElseIf OptionButton16.Value = True Then
Worksheets("CBRB").Select
This is the same as all of the other option button.
Please help!
 
More than likely the error means that the subscript CBRB, that you used for the Worksheets object, doesn't exist.

When the code gets to this point, does the sheet named CBRB still exist?
 
Subscript out of range means either that you are trying to do an action on something that isn't there or the value you are trying to assign is out of the range of available values for that datatype

Would suggest that there is either not an option button called optionbutton16 or there isn't a sheet in the activeworkbook called "CBRB" Rgds
~Geoff~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top