Forum Discussion
MS Project VBA Default Location and Default AutoScheduled tasks
- Nov 16, 2021
It is a little strange about the auto/manual scheduling option not being available via VBA, all the other scheduling options are.
Yes, you can set auto/manual in the registry. This is what it looks like on my PC, which is currently set for auto schedule.
John
The default file path for save operations is controlled by the Project options setting. Unfortunately those settings are not readable directly as they are in Excel. I haven't tried this but it may be possible to get the default file path by creating and querying a FileSystemObject.
Another option is an indirect method and that is simply opening a file you know is in the default location and then using: ActiveProject.FullName
On your other question, for whatever reason the scheduling mode is not an exposed parameter when setting options using VBA. Sorry.
Hope this helps.
John
I will have a play around with FileSystemObject and see what I can get there.
On Auto Scheduling, It seems strange to me that something (in my opinion) is so important is not available.
Do you know if this is stored in a Registry Key, I may try making adjustments there?
The reason for the questions is that our IT department just installs an out-of-the-box version of MS Project, but our Project Office has some standards. I'm trying to automate setting those standards rather than relying on people who can make mistakes.
- John-projectNov 16, 2021Silver Contributor
It is a little strange about the auto/manual scheduling option not being available via VBA, all the other scheduling options are.
Yes, you can set auto/manual in the registry. This is what it looks like on my PC, which is currently set for auto schedule.
John
- Gilgamesh1964Nov 16, 2021Brass ContributorThank You for all your assistance.
I ran some code to edit the registry key which worked (I opened RegEdit to have a look t it) but when I closed MS Project it reverted to it's previous value 😞
Looks like I will have to write some idiot-proof instructions for people to change this setting manually (and I'm sure someone will still mess it up)- John-projectNov 17, 2021Silver ContributorGilgamesh1964,
You're welcome and thanks for the feedback.
Strange. I've never tried to change the registry with code, I've only done it manually. Did you include in your code a line to save Project? I would think that would save the change to the GLobal.
John