Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to access programatically added controls
I have a UF to which some code adds a CommandButton in
runtime. No problem. But in design mode, by defenition, the added control doesn't exist. So where do I put code to recognise and act upon its click event. I've run out of inspired guesses. Any help would be appreciated. Don |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to access programatically added controls
John Walkenbach has an example using OptionButtons at:
http://j-walk.com/ss/excel/tips/tip76.htm But as an alternative, couldn't you design your form with that button already on there--just have it not visible. Then when/if you need it, show it. (seems much easier to me). don bowyer wrote: I have a UF to which some code adds a CommandButton in runtime. No problem. But in design mode, by defenition, the added control doesn't exist. So where do I put code to recognise and act upon its click event. I've run out of inspired guesses. Any help would be appreciated. Don -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to access programatically added controls
Don,
Might be easier to add the control and its code during design and set the visible property to false. Then when you want to use the control, set its visible property to true. Regards, Jim Cone San Francisco, CA "don bowyer" wrote in message ... I have a UF to which some code adds a CommandButton in runtime. No problem. But in design mode, by defenition, the added control doesn't exist. So where do I put code to recognise and act upon its click event. I've run out of inspired guesses. Any help would be appreciated. Don |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to access programatically added controls
Thanks to both Dave & Jim. That is the conclusion I came
to - keep it simple! I will look at John's site for OptionButtons though. Cheers Don -----Original Message----- John Walkenbach has an example using OptionButtons at: http://j-walk.com/ss/excel/tips/tip76.htm But as an alternative, couldn't you design your form with that button already on there--just have it not visible. Then when/if you need it, show it. (seems much easier to me). don bowyer wrote: I have a UF to which some code adds a CommandButton in runtime. No problem. But in design mode, by defenition, the added control doesn't exist. So where do I put code to recognise and act upon its click event. I've run out of inspired guesses. Any help would be appreciated. Don -- Dave Peterson . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
can i access the cell colour programatically? eg if cell is blue | Excel Discussion (Misc queries) | |||
How to manipulate controls added at run-time | Excel Worksheet Functions | |||
ActiveX Controls vs Form Controls | Excel Discussion (Misc queries) | |||
Programatically set ref to my DLL | Excel Programming | |||
Accessing ActiveX Controls using VBA - can't use Control.Name to access. | Excel Programming |