Ir al contenido

Run as a VBA-Only App (Hide the Excel Window Completely)

Esta página aún no está disponible en tu idioma.

Run as a VBA-Only App (Excel Main Window Fully Hidden)

Section titled “Run as a VBA-Only App (Excel Main Window Fully Hidden)”

If your protected workbook is driven entirely by VBA code and UserForms, and the spreadsheet itself is never meant to be seen by your end-users, you can ship it as a VBA-only app. The Excel main window stays hidden from start to finish, including its taskbar icon, and only your UserForm appears on screen. Your application looks and feels like a standalone Windows program, with no visible trace of Excel.

This option is available since XLS Padlock 2026.0.

Use the VBA-only mode when all of the following are true:

  • Your application’s user interface is built with UserForms, not worksheets.
  • You don’t want end-users to see, edit, or interact with the underlying spreadsheet.
  • You want a clean, branded look at startup, no Excel splash, no Excel taskbar entry.

If your application relies on visible worksheets (data entry grids, dashboards rendered as cells, etc.), do not enable this option, the worksheets won’t be visible to your users.

  1. Open your project in XLS Padlock.
  2. Go to the Splash Screen page (under Application Customization).
  3. Tick the option “Run as a VBA-only app (Excel main window fully hidden)”.

That’s all on the XLS Padlock side. Now you need to add a small piece of VBA code to your workbook so your UserForm is shown when the application starts.

In the Excel VBA editor, open the ThisWorkbook module and paste:

Private Sub Workbook_Open()
Application.Visible = False
UserForm1.Show
End Sub

Replace UserForm1 with the name of the form you want to display first.

With the checkbox enabled and the VBA snippet above:

  • No Excel splash screen at launch.
  • No Excel main window at any point during the application’s lifetime.
  • No “Excel” entry in the Windows taskbar, only your UserForm.
  • Your application behaves like a standalone Windows program built around your form.

If you’ve also configured a splash screen and hidden the Loading workbook dialog, the entire startup sequence stays inside your branded UI from the very first frame.

Because Excel is hidden, the standard Excel close button is not available to your users. You typically close the application from your UserForm using:

Private Sub btnClose_Click()
Application.Quit
End Sub

Or if you want to leave Excel running but unload your UI:

Unload Me
SettingBehavior when “VBA-only app” is enabled
Excel Main Window Display at Startup (Normal / Maximized / Minimized)Overridden, Excel always starts hidden.
Do not display the “Loading workbook” dialog boxRecommended to enable as well, for a fully silent startup.
Splash ScreenWorks as configured. Displayed before Excel even loads.