VBA & Macro Problems

Find Excel VBA Code That Displays a Popup on Startup

Maira MehtabMaira Mehtab Nov 22, 2026 869 views

Question details

The user needs to find what displays a popup when an Excel workbook opens.

Find Excel VBA Code That Displays a Popup on Startup
Product
Microsoft Excel
Device & OS
not provided
Scenario
A popup appears when a workbook opens, but no relevant macro is visible under the Developer tab.
Observed behavior
The popup still appears after some VBA code was deleted and the workbook was saved.
Before you start

Open the affected workbook and note the popup's exact text and when it appears. Check the file extension: an .xlsx workbook cannot store VBA macros, while .xlsm and .xlsb files can.

Solution 1Recommended

Inspect workbook and worksheet event code

Use the Visual Basic Editor to find event procedures that may run without appearing in the Macro dialog.

1
Open the VBA editor

In Excel, select Developer > Visual Basic. On Windows, you can also press Alt+F11. If Developer is hidden, enable it through Excel's ribbon customization settings.

2
Inspect ThisWorkbook

In the editor, select View > Project Explorer, expand the affected workbook, and double-click ThisWorkbook. Look for Workbook_Open or Workbook_Activate procedures and statements such as MsgBox or UserForm.Show.

3
Inspect worksheet modules

Under Microsoft Excel Objects in Project Explorer, double-click each worksheet and look for procedures such as Worksheet_Activate or Worksheet_SelectionChange. You can also right-click a worksheet tab at the bottom of Excel and select View Code.

4
Search the project

In the VBA editor, select Edit > Find, choose Current Project, and search for distinctive popup text, MsgBox, UserForm, and Auto_Open. Check standard modules for an Auto_Open procedure.

Inspect workbook and worksheet event code
Event code may not appear in the Macro dialog: Private event procedures can run automatically without appearing in Developer > Macros. If the VBA project is locked, you may need its password or help from the workbook owner.
Free Microsoft Office alternative

Work with Excel spreadsheets in WPS Office

WPS Office is a free, lightweight alternative with a familiar spreadsheet interface for opening and editing Excel files. It can make moving everyday spreadsheet work easier, but it does not diagnose or repair Excel's startup VBA behavior.

Open and edit common Microsoft Excel formats, including XLSX and XLSReview spreadsheet cells, comments, and other visible content in WPS SpreadsheetsUse a familiar interface for everyday spreadsheet tasksMove between compatible Office documents without changing your basic workflow
microsoft office alternative - wps office

Frequently Asked Questions

Why can't I see the startup code under Developer > Macros?

Private event procedures, such as Workbook_Open, may not appear in the Macro dialog. Open Developer > Visual Basic and inspect ThisWorkbook and the worksheet modules instead.

Where is the View Code option?

In Excel, right-click a worksheet tab at the bottom of the workbook and select View Code. Do not right-click the popup title.

Can a cell display a message without VBA?

Yes. Select the cell and check Data > Data Validation > Input Message. A configured message can appear when the cell is selected.

What if the workbook's VBA project is locked?

If Project Explorer prompts for a password when you expand the project, ask the workbook owner for access. The project code cannot be inspected normally without it.