vba-hide workbook and show user form when excel is opened

happycode

New Member
Joined
Aug 25, 2020
Messages
5
Office Version
  1. 2010
Platform
  1. Windows
Hi,
I want to open my userform when my excel is opened and hide the excel behind until the user form closes.
I used
Application. Visible false
Me. Show

It is working but when the excel is opened it shows the excel for a moment and then it is showing userform.
I also tried keeping update links to false. But same thing happened.
How to avoid the workbook shown for a second and show only userform when the excel is opened.
Thank you in advance!
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
I used this:
VBA Code:
Private Sub Workbook_Open()
Application.ScreenUpdating = False
Application.Visible = False

UserForm1.Show modeless
Application.ScreenUpdating = True
End Sub
NB test on a COPY of your work first.

The problem is, I don't think the VBA even starts running until the application has started up enough to run the workbook_Open event.
With my setup, the worksheets aren't visible this way, but I do still see the Excel application starting, before the .visible property's set to False, so it's probably no better than that which you've already achieved.
I was hoping that setting screen updating to false might mask the application's startup.

It could be that some of the Top Folk here, will have a better idea...
 
Upvote 0
Can't we reduce the load time? And open userform without showing the excel for a second.
Actually firstly it was working fine only later on this is happening. I'm not sure why.
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,380
Members
448,955
Latest member
BatCoder

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