Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using a command button created at runtime

Status
Not open for further replies.

stibbetts

Technical User
May 6, 2004
64
US
I have a multipage user form, there is a command button that creates a new page and inserts several things, a picture, 6 comboboxes and a command button, the problem is that i cant seem to make the command button perform any task. i write code for it but it wont do anything. any ideas?
 
This is related to a known issue. As I said in another post today, I think you will find that Thread707-572718 addresses your situation pretty well. There's some really good stuff particularly in the second half of the thread.

What it boils down to is that you will need to use a custom class to get your control's events working. Don't worry, an example is provided (dealing with an array of controls, but should be adaptable).

VBAjedi [swords]
 
Just a quick check here, you MUST NOT be in design mode to click the button, and click on a "dead" cell b4 clicking on the button. To test the code from the vb screens click on the right arrow to test until the code runs, then exit the code screen,returning to the worksheet, exit design mode, (optional) close the toolbar for controls, again click a dead cel, then the click the button. This should execute the button, and run the code or error, the only two possibilities...
 
vbajedi thanks. that should do what i wanted.
docjohn52, Im not exactly sure what you are saying?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top