displaying a userform after a sheet is selected

forest1959

New Member
Joined
Mar 16, 2010
Messages
30
Office Version
  1. 2016
Platform
  1. Windows
Hi

I'm trying to write some code that will firstly, open a specific worksheet, then display a userform.. Anything i have tried so far displays the user form before opening the worksheet.

the code i am using is below.

Is there something simple i'm missing that would delay the displaying of the userform until the user had visibility of the "Technique" worksheet.

Many Thanks

Code:
Sub SaveWithVariableFromCell()


    Application.ScreenUpdating = False
    
    Sheets("Technique").Visible = True
    Sheets("Calculator").Visible = False
    Sheets("Schedule").Visible = False
    Sheets("User Guide").Visible = False
    Sheets("Home").Visible = False
    Sheets("Technique").Select
    
    UserForm2.Show


    Application.ScreenUpdating = True    
    
End Sub
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Try turning ScreenUpdating back on, before showing the userform
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,215,043
Messages
6,122,816
Members
449,095
Latest member
m_smith_solihull

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