Enhance compiled workbook with the “Hide Excel GUI on Start” Feature
The DoneEx XCell Compiler provides a powerful option to hide the Excel graphical user interface (GUI) upon startup. This feature is especially useful for authors who want to create an application-like experience for their Excel workbooks, removing the typical Excel interface elements that are usually visible when a workbook opens.
The “Hide Excel GUI on Start” option allows developers to present a cleaner, more focused end-user interface by making the standard Excel grid and ribbon invisible. Instead, users see only the custom-designed forms or user interfaces that you create. This gives your application a more polished, professional appearance similar to standalone Windows applications.
To use this feature, you must design your custom interface using VBA (Visual Basic for Applications). This typically involves creating a UserForm and calling it from the Workbook_Open procedure, ensuring that it appears as soon as the application starts. When you compile with the “Hide Excel” option enabled, Excel remains hidden in the background when the file is running. The user only interacts with the UserForm, providing a seamless user experience. Note that this feature only hides Excel. Excel is still necessary to run the compiled application.
It’s important to note that the “Hide Excel GUI on Start” option does not affect the security or protection level of the compiled EXE file. The security measures applied to the compiled application remain intact. Those security measures are what safeguards your intellectual property and data.
Hide Excel GUI Feature In Action
To see this Excel hiding feature in action, you can download and review the following two sample files:
samplevba_he.exe – This file was compiled for both 32-bit and 64-bit Excel with the “Hide Excel GUI” option enabled. When you run this EXE file, you’ll notice that the custom form appears immediately. It has no trace of the Excel interface.
samplevba.exe – This file was compiled with the “Hide Excel” option disabled. Running this file will display the standard Excel interface alongside the custom form.
For reference, you can find the original SampleVBA.xls file on your computer under the following directory: Documents >> DoneEx >> Samples
If you explore the provided example files, you’ll notice that they feature a custom form designed with VBA. By enabling the “Hide Excel GUI on Start” option, this form becomes the primary interface, completely replacing the default Excel view.
To achieve this effect in your own projects, follow these steps:
Design a UserForm using VBA to serve as the primary user interface.
Call the UserForm from the Workbook_Open procedure to ensure it launches as soon as the EXE file is executed.
Private Sub Workbook_Open() MainForm.Show vbModal End Sub
By taking advantage of the “Hide Excel GUI on Start” option, you can transform your Excel workbooks into sleek, professional-looking applications that offer a modern, user-friendly experience.