You don't need to pass the workbook name. Give your Main project
a new Project Name (in VBA, with the Main project active, go to
the Tools menu, choose "VBAProject Properties" and give the
project a new name like MainProject). Then, in the Compliance
workbook code, use
Application.VBE.VBProjects("MainProject").VBCompon ents("ThisWorkbook").Activate
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"DRK" wrote in message
...
I have two workbooks - I'll call them Main and Compliance.
Compliance is used
solely to print the legal compliance stuff. Main handles the
concept stuff
and printing the concept stuff.
My custom menu in Main calls a print macro in Compliance. When
that macro is
done, I want to activate the Main workbook. The problem is the
Main Workbook
name can be different so I can't hard code the name into
Compliance code to
activate the Main workbook.
The end users want to save each Main workbook under a different
name to
preserve their cases.
How can I send or carry over the name of the Main workbook with
what ever is
its current name to the Compliance workbook?
--
DRK