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

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Try turning ScreenUpdating back on, before showing the userform
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

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