S
Steph
Hi -
Having an issue with macros - hopefully someone has some brilliant ideas:
1)Need to update a set of macros for all our users. Each user has a separate
global.mpt on their PCs (wish we could do one global.mpt on the server, then
I wouldn't need to ask this question - but we can't.)
2) Wrote some code - on Project_Open - to check if the macros are the
correct version. If not - it opens another .mpp file that contain the new
macros, and then copies the new macros to the user's global.mpt. However,
the problem I'm running into, is that one of the modules is in use, and the
new version gets copied and renames the module - adding a "1" to the name.
3) The module that is in use is simply a list of constants called mVersions:
Public Const vers = "Version 3.02"
Public Const vdate = "December 9 2004"
Public Const pver As Integer = 301
Public Const currsvr = "c:\documents and settings\my documents\"
Public YesACRun As Boolean
4) After the code runs to update the macros - this module gets renamed to
mVersions1. Which isn't so bad. However, if I run the update macro again,
mVersions gets added again - and now there are two - mVersions1, and
mVersions - which is bad.
So - my questions are - how can I avoid mVersions getting renamed to
mVersions1? or - how can I rename it back to mVersions? Or is there a better
process I should be using in the first place?
TIA
Stephanie
Having an issue with macros - hopefully someone has some brilliant ideas:
1)Need to update a set of macros for all our users. Each user has a separate
global.mpt on their PCs (wish we could do one global.mpt on the server, then
I wouldn't need to ask this question - but we can't.)
2) Wrote some code - on Project_Open - to check if the macros are the
correct version. If not - it opens another .mpp file that contain the new
macros, and then copies the new macros to the user's global.mpt. However,
the problem I'm running into, is that one of the modules is in use, and the
new version gets copied and renames the module - adding a "1" to the name.
3) The module that is in use is simply a list of constants called mVersions:
Public Const vers = "Version 3.02"
Public Const vdate = "December 9 2004"
Public Const pver As Integer = 301
Public Const currsvr = "c:\documents and settings\my documents\"
Public YesACRun As Boolean
4) After the code runs to update the macros - this module gets renamed to
mVersions1. Which isn't so bad. However, if I run the update macro again,
mVersions gets added again - and now there are two - mVersions1, and
mVersions - which is bad.
So - my questions are - how can I avoid mVersions getting renamed to
mVersions1? or - how can I rename it back to mVersions? Or is there a better
process I should be using in the first place?
TIA
Stephanie