Selecting a Worksheet

Rocky0201

Active Member
Joined
Aug 20, 2009
Messages
278
Hi...

In my worksheet (we'll call it Sheet1) I have a BeforeDoubleClick that launches Userform1.

UserForm1 has a ComboBox and a TextBox where the user can select a predefined list of names (The name in the TextBox is the name of another worksheet).

Also on the UserForm1 I have a CommandButton that I call Go To. My goal is to go to the worksheet that has been select from the ComboBox when the CommandButton is pressed.

As I step through the code, the worksheet I want to go to is in fact selected but then the Sheet1 is immediately re-selected when I return back to Sheet1.

How do I go to Sheet2 from Sheet1 and stay on Sheet2?

Thanks for the help.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
If it's the combobox with the worksheet names you could try this.
Code:
Application.Goto Worksheets(ComboBox1.Value).Range("A1"), True
I'm not actually sure where the textbox comes into it though.:)
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top