- Enable VBA Editor if not enabled
Open Excel Options window from File menu and check the Developer
- Open VBA editor
Click Developer on Excel 2010, the Visual Basic button will appear on the top left. Click on “Visual Basic” to open the VBA editor
- Lock the VBA code from view for any reasons
Right click the mouse on VBAProject (Book1) and select VBAProject Properties to open the property window.
Select the Protection page, type the password and check “Lock project for viewing”
- Write the VBA code, debug and run
- Add the GUI
- Save the Excel as the Macros enabled file type (xlsm)
Leave a Reply