Run as a VBA-Only App (Hide the Excel Window Completely)
Ce contenu n’est pas encore disponible dans votre langue.
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.
When to Use It
Section titled “When to Use It”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.
How to Enable It
Section titled “How to Enable It”- Open your project in XLS Padlock.
- Go to the Splash Screen page (under Application Customization).
- 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.
Add the VBA Startup Code
Section titled “Add the VBA Startup Code”In the Excel VBA editor, open the ThisWorkbook module and paste:
Private Sub Workbook_Open() Application.Visible = False UserForm1.ShowEnd SubReplace UserForm1 with the name of the form you want to display first.
What the End-User Sees
Section titled “What the End-User Sees”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.
Closing the Application
Section titled “Closing the Application”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.QuitEnd SubOr if you want to leave Excel running but unload your UI:
Unload MeInteraction with Other Settings
Section titled “Interaction with Other Settings”| Setting | Behavior 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 box | Recommended to enable as well, for a fully silent startup. |
| Splash Screen | Works as configured. Displayed before Excel even loads. |