creating controls using code

A

ashishprem

Hi,
I have created a user form in excel. I want to make checkbox
dynamically when a user presses a comand button. Can anyone please help
me out.
Regards,
Ashish
 
S

S. I. Becker

Hi,
I have created a user form in excel. I want to make checkbox
dynamically when a user presses a comand button. Can anyone please help
me out.
Regards,
Ashish

Your best bet is not to create the control dynamically, but for it to be
there already but invisible and make it visible when the button is pressed.
Add the checkbox to the form and set its Visible property to False. Then
add this line to the button's Click event:

Checkbox1.Visible = True

Obviously, replace "Checkbox1" with the name of your checkbox.

HTH,

Stewart
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top