S
Steven D
I have a procedure in VBA (in personal.xls) that creates
a command button, automatically calling it
[commandbutton1] & putting it on a sheet called "Graphs".
I can set usual properties for it such as:
..caption
..accelertor &
..value
in my code at run time but I can't find a way to assign a
sub procedure to the command button and it's driving me
up the wall ;(
For example, all I would like to be able to would be
start with something simple like have code assigned to
the button such as:
sub commandbutton1()
msgbox "hi"
end sub
Is this possible?
Currently the only way I know of to create my spreadsheet
with my command button in and be able to click it and
come up with that message box is to have a separate
procedure alreay in my personal.xls. If I were to send
other people the spreadsheet I'd have to copy the module
with all this code in it, in to the new workbook for the
command button's code to run. Which I don't fancy doing!
Any help would really be appreciated. I can get round the
problem as mentionned but having the code actually 'in'
the new workbooks command button would be better.
Regards
Steven D
a command button, automatically calling it
[commandbutton1] & putting it on a sheet called "Graphs".
I can set usual properties for it such as:
..caption
..accelertor &
..value
in my code at run time but I can't find a way to assign a
sub procedure to the command button and it's driving me
up the wall ;(
For example, all I would like to be able to would be
start with something simple like have code assigned to
the button such as:
sub commandbutton1()
msgbox "hi"
end sub
Is this possible?
Currently the only way I know of to create my spreadsheet
with my command button in and be able to click it and
come up with that message box is to have a separate
procedure alreay in my personal.xls. If I were to send
other people the spreadsheet I'd have to copy the module
with all this code in it, in to the new workbook for the
command button's code to run. Which I don't fancy doing!
Any help would really be appreciated. I can get round the
problem as mentionned but having the code actually 'in'
the new workbooks command button would be better.
Regards
Steven D