0

I know the method as Application.Visible = False and Application.Screenupdating = False

When opening the file, I want the user to see only the userform.

The thing is: with these two commands above, Excel appears for 1 second. Is it possible to do it without Excel blinking like this?

Thanks in advance.

AndroidDev
  • 831
  • 5
  • 17
  • 36
  • are you talking about making them not even see the excel splash screen? – user3271518 Oct 26 '14 at 00:20
  • you have the form opening in Sub auto_open()?....if you do and it still shows the screen I think the only way to suppress the screen is through modifying the shortcut. I will watch this to see if anyone has another answer. – user3271518 Oct 26 '14 at 00:34
  • Try HTA or [this WSH VBS GUI](https://stackoverflow.com/a/47111556/2165759) – omegastripes Nov 27 '18 at 15:54

1 Answers1

1

You may try to open the excel file not with excel itself to avoid the splash. Try script to open excel file, then form will open without splash :

'save this in a text file, change extension as .vbs

Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = false
Set objWorkbook = objExcel.Workbooks.Open("C:\Users\USER\Desktop\yourfile.xlsm") 

'this will open excel as invisible, so to close excel you have to insert some button inside userform or something like ThisWorkbook.Close savechanges = False or Application.Quit

'and of course assuming that your form is in the workbook_open in your project like

Private Sub Workbook_Open()
'ActiveWindow.WindowState = xlMinimized
'Application.Visible = False
Application.ScreenUpdating = False
Application.EnableEvents = False
'Application.EnableAnimations = False
UserForm1.Show
End Sub
ZAT
  • 1,347
  • 7
  • 10
  • I tried that. But when I try to open the .vbs file, nothing happens. – AndroidDev Oct 26 '14 at 12:31
  • you dont have to open vbs from excel! double click on the .vbs file. Have you used vbs file in the past? – ZAT Oct 26 '14 at 17:54
  • I have not. But that's what I did. I tried double clicking it! – AndroidDev Oct 26 '14 at 23:49
  • you have to change the file path and file name of yours in my above vbs code. Try `objExcel.Visible = true` to see whether excel opens or not. – ZAT Oct 28 '14 at 07:03