After you’ve built a calendar in Visio, use the Configure box to set the date range, and the calendar dates fill in automatically. If you try that and nothing happens, or the Configure box doesn’t appear, it’s a surprise but it’s also simple to fix.
Click File > Options.
In the Visio Options box, click Advanced.
Under General (you might have to scroll down to find it), check the Enable Automation Events box.
To make sure the change takes effect, save your drawing and restart Visio.
You should have to do this only once. Enabling automation events also addresses some problems that might occur with other types of drawings, such as UML or Database models.