Exporting calendars from MSP to Excel
Karl Ernst Buddenbrock
0:00 / 0:00
Exporting calendars from MSP to Excel
60 просмотров · 1 мес. назад
Karl Ernst Buddenbrock
785 подписчиков
60 просмотров · 1 мес. назад
In this video, I show you how to export the holidays/exceptions from a customized calendar in Microsoft Project — since Project doesn't have a built-in "export holidays" button, we use a simple VBA macro to pull them out into Excel or a CSV file.
🔗 Get the code here: https://drive.google.com/file/d/1KuRs...
HOW TO DO IT:
1️⃣ Find your calendar's holidays Go to Project/ Change Working Time, and select your calendar from the "For calendar" dropdown. If you edited the built-in Standard calendar directly, it'll just be called "Standard." The Exceptions tab lists all the holidays with their dates.
2️⃣ Open the VBA editor Click the View tab, then the Macros dropdown on the far right, and select Visual Basic. This works the same whether you're on a physical Windows machine or a Windows shell/VM — no need to hunt for keyboard shortcuts.
3️⃣ Insert a new module In the VBA editor, right-click your project in the Project Explorer panel (or VBAProject (Global.mpt) if you want it available across all projects), then choose Insert /Module. Paste the macro code into the blank window that opens.
4️⃣ Set the calendar name in the code Update the calName variable to match your calendar's exact name — "Standard" if that's what you're working with, or whatever custom name you gave it.
5️⃣ Run the macro Click inside the code and press F5 (or Run/Run Sub/UserForm). If Project blocks it, enable macros under File/ Options/Trust Center/ Trust Center Settings/Macro Settings.
6️⃣ Check your output Depending on which version of the macro you use, you'll get either a new Excel workbook with your holidays listed, or a CSV file saved to the folder path you specified in the code.
A couple of things to note: if your calendar is a task/resource calendar rather than a base calendar, the macro needs a small tweak to find it. And recurring holidays (like "every Christmas") export as a single date range rather than every individual occurrence — that needs a bit of extra logic if you want them broken out.
Timestamps: 0:00 Intro 0:00 Why Project doesn't have a native export option 0:00 Opening the VBA editor 0:00 Setting the calendar name 0:00 Running the Excel export macro 0:00 Running the CSV export macro 0:00 Wrap up
If you found this useful, consider liking and subscribing for more Microsoft Project tips and tricks.
#MicrosoftProject #VBA #ProjectManagement