Show an Excel VBA Pop-Up Calendar When a Workbook Opens
Question details
Show an existing VBA calendar form when an Excel workbook opens with cell A6 already selected.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A workbook uses a SelectionChange event to display a calendar when the user selects cell A6.
- Observed behavior
- The calendar does not appear on opening if A6 is already selected because no selection change occurs.
Confirm that the calendar UserForm already exists and check its name and the target worksheet name in the VBA editor. Save the workbook as an Excel Macro-Enabled Workbook (.xlsm) and allow macros if prompted.
Show the calendar with the Workbook_Open event
Use this event to display the existing calendar form at startup without relying on a selection change.
The Worksheet_SelectionChange event runs when the selection changes, not simply because the workbook opens with A6 selected. Temporarily disabling events while selecting A6 also prevents that selection from opening a second calendar.
In Excel, press Alt+F11 to open the VBA editor. In Project Explorer, expand your workbook and double-click ThisWorkbook.
Paste the following code into ThisWorkbook. Replace Sheet1 and frmCalendar with your actual worksheet and UserForm names: Private Sub Workbook_Open() On Error GoTo RestoreEvents Application.EnableEvents = False Me.Worksheets("Sheet1").Activate Me.Worksheets("Sheet1").Range("A6").Select Application.EnableEvents = True frmCalendar.Show Exit Sub RestoreEvents: Application.EnableEvents = True MsgBox "Could not open the calendar: " & Err.Description End Sub
Use File > Save, close the workbook, and reopen it. Enable macros if prompted; Excel should select A6 and show the calendar.

Work with Excel spreadsheets in WPS Office
WPS Office is a free, lightweight, easy-to-use alternative with a familiar spreadsheet interface and Microsoft Office format compatibility for a smooth transition. Use Microsoft Excel to troubleshoot the Workbook_Open VBA event; WPS does not fix that Excel event issue.

Frequently Asked Questions
Why doesn't SelectionChange run when the workbook opens on A6?
Opening the workbook with A6 already selected does not necessarily change the selection, so Worksheet_SelectionChange does not fire. Use Workbook_Open in ThisWorkbook for startup behavior.
Where should I put the Workbook_Open code?
Press Alt+F11, find your workbook in Project Explorer, and double-click ThisWorkbook. Place the event procedure in that module, not in a worksheet module.
Why doesn't Workbook_Open run after I add it?
Check that the file is saved as .xlsm and that macros are enabled when you open it. If Application.EnableEvents was disabled by another macro, re-enable it in the VBA Immediate window with Application.EnableEvents = True, then reopen the workbook.
How can I prevent the calendar from appearing twice at startup?
Set Application.EnableEvents to False before selecting A6 in Workbook_Open, then set it back to True before showing the form. This prevents the selection from triggering the existing SelectionChange handler during startup.




