As a public variable, its value will persist but you do need to run the macro to give it a value first. So you should rename the setProjectPath macro to Document_Open or Document_New as these will autorun with either opening an existing document or creating a new document respectively.
Alternatively, you could declare it as a constant.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|