Hi
That's the problem I found:
I have a .xlt, with a ToolBar. I create the ToolBar by code, and assign to the "onAction" even of every button the name of the macro it calls.
By now, all OK
If I open a Workbook, it works fine. But if I open a secon Workbook (based on the same .xlt) I found the problem: The second Workbook doesn't create the Toolbar, because It exists, but if I push a button, it calls the macro of the first Workbook opened, not of the actual Workbook.
And, if I close the first Workbook, when I push a button, then Excel try to open the document that created the ToolBar(The Toolbar refence it)
I don't know if I explained clearly...
The fast solution I'm searching it's:
o_Command.onAction = "ActiveWorkBook.MacroX"
But I don't know how to access Macros throught the ActiveWorkBook Object. It's possible?
I sorry that looooong explanation.
Thanks in advance
That's the problem I found:
I have a .xlt, with a ToolBar. I create the ToolBar by code, and assign to the "onAction" even of every button the name of the macro it calls.
By now, all OK
If I open a Workbook, it works fine. But if I open a secon Workbook (based on the same .xlt) I found the problem: The second Workbook doesn't create the Toolbar, because It exists, but if I push a button, it calls the macro of the first Workbook opened, not of the actual Workbook.
And, if I close the first Workbook, when I push a button, then Excel try to open the document that created the ToolBar(The Toolbar refence it)
I don't know if I explained clearly...
The fast solution I'm searching it's:
o_Command.onAction = "ActiveWorkBook.MacroX"
But I don't know how to access Macros throught the ActiveWorkBook Object. It's possible?
I sorry that looooong explanation.
Thanks in advance