Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Brad
Private Sub CommandButton1_Click() On Error Resume Next Worksheets(ListBox1.Text).Activate Unload Me End Sub The On Error thing takes care of both "no such sheet" and "no listitem selected". Not in a very elegang way, but it works most of the time. -- HTH. Best wishes Harald Excel MVP Followup to newsgroup only please. "Brad Zenner" wrote in message ... I am creating a userform with a listbox of sheet names (e.g. APPLE, BANANA, PEAR, etc.) All of the items in the list box reference sheet names in the workbook. What I'm wondering is if there is a way to go to the sheet that's selected in the listbox when closing out of the userform (so when I select APPLE and click OK, it takes me to the APPLE worksheet). Any help is greatly appreciated. Thanks. Brad Z |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
rookie question | Charts and Charting in Excel | |||
goto (F5) question | Excel Discussion (Misc queries) | |||
Listbox Question | Excel Discussion (Misc queries) | |||
Validation Data & Goto question | Excel Discussion (Misc queries) | |||
Listbox question | Excel Programming |