ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   creating controls using code (https://www.excelbanter.com/excel-programming/354688-creating-controls-using-code.html)

ashishprem[_11_]

creating controls using code
 

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


--
ashishprem
------------------------------------------------------------------------
ashishprem's Profile: http://www.excelforum.com/member.php...o&userid=31485
View this thread: http://www.excelforum.com/showthread...hreadid=517648


S. I. Becker

creating controls using code
 
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




All times are GMT +1. The time now is 05:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com