View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Henry[_5_] Henry[_5_] is offline
external usenet poster
 
Posts: 104
Default VBA generated command buttons

Andy,

Can you create your command button(s) at design time but make Visible =
False until you need them to be shown, when you set Visible = True.
You can have many invisible controls on a form and only make the ones you
need visible when you want the user to be able use them.
If you've got many controls, you can also put them one on top of the other
to save space.
Only the topmost, visible one will be shown and accessible.
If you're not short of space, you could have the controls visible but set
Enabled = False.
That way, the user can still see them but cannot do anything with them
(they're greyed out).

HTH
Henry

"Andy" wrote in message
...
I am writing VBA to generate user input sheets, within
these I can create command buttons and change the caption
but how do I programatically make this button call a
macro when it is clicked?