N
nullGumby
Using Excel 2003, I'm trying to write a module that will dynamically
create a toolbar and buttons when the workbook loads, destroy the
toolbar when it's closed, and handle the clicking on the buttons on
it.
I have already written all the code for creating a toolbar and
destroying the toolbar.
What I'm struggling with is a way to handle the clicking of the command
buttons on the toolbar. I know there's an "onAction" property that I
can point to a macro, but I'd like my module to have a procedure called
"HandleCMDClick" or something, and be able to handle the clicking of any
button.
I've already tried including a parameter at the end of the "onAction"
property, i.e. "modToolbar.HandleCMDClick("Button1")", but that doesn't
work; it doesn't recognize that as a call to "HandleCMDClick". Is there
a way, in the "HandleCMDClick" procedure, that I can tell which button
was clicked?
Anyone have any insight they can lend? Thanks much.
create a toolbar and buttons when the workbook loads, destroy the
toolbar when it's closed, and handle the clicking on the buttons on
it.
I have already written all the code for creating a toolbar and
destroying the toolbar.
What I'm struggling with is a way to handle the clicking of the command
buttons on the toolbar. I know there's an "onAction" property that I
can point to a macro, but I'd like my module to have a procedure called
"HandleCMDClick" or something, and be able to handle the clicking of any
button.
I've already tried including a parameter at the end of the "onAction"
property, i.e. "modToolbar.HandleCMDClick("Button1")", but that doesn't
work; it doesn't recognize that as a call to "HandleCMDClick". Is there
a way, in the "HandleCMDClick" procedure, that I can tell which button
was clicked?
Anyone have any insight they can lend? Thanks much.