Show userform upon worksheet open

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
3,813
Office Version
  1. 2007
Platform
  1. Windows
Morning all,
As per title, in my workbook i have several worksheets.
On one worksheet when i click on the name tab i would like the userform to be shown.
I have clicked the tab in question,alt + f11, this workbook and then placed the following code there.
When i then click the tab in question i would expect the userform to be shown but i just see a blank worksheet & dont see any errors either.
What happens is when i open the workbook the userform is shown,but i would only like to see userform when i click the tab of the required worksheet.

What did i do wrong.
Many Thanks.

Code:
Private Sub Workbook_Open()LockPicking.Show
End Sub
 
Last edited:

Some videos you may like

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
3,813
Office Version
  1. 2007
Platform
  1. Windows
My mistake and all sorted now.
I was using the OPEN command and should of used ACTIVATE command.

Thanks.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,970
Messages
5,599,106
Members
414,287
Latest member
Rbwester

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
Top