Excel 2000 custom toolbar button macro assignment
Since you've gone this long without an answer, I'll give you a
less-than-expert opinion, since I'm not an IT guy and don't have significant
experience with workbook sharing and macros.
IMO, the answer is what is commonly done by VBA developers, namely: Create
the toolbar programmatically using wb_open event code and make it Temporary.
The macro assignments will be made each time the wb is opened and point to
those of the local wb. Also add wb_deactivate code to make it disappear or
disabled, and wb_activate code to undo this. An alternative to making it
Temporary is to use wb_beforeclose event code to delete it.
I suspect the situation you describe is similar to what happens when someone
makes a copy using Save As. The macros get reassigned to the new wb in this
event. And when someone opens the original, the macros now point to the new
wb. Excel will attempt to open the new workbook when you try to run a macro.
Toolbar customizations are saved external to the wb in the Excel.xlb file.
I suggest that you google for example code on how to create toolbars
programmatically if you're not familiar. Unless you get a better answer, try
it experimentally.
Greg
|