ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Conditional Checkbox Creation on a UserForm (https://www.excelbanter.com/excel-programming/283205-conditional-checkbox-creation-userform.html)

Todd Huttenstine[_2_]

Conditional Checkbox Creation on a UserForm
 
On my spreadsheet I have 3 sheets. Sheet2 is called "Team
Management Database". On Row 4 starting in column A, I
have names. I have a UserForm(UserForm1). I would like
for the code to look on Sheet2 and for each name it finds
in Row4, I would like it to create a checkbox with that
name, and place the checkbox on UserForm1. If the only
names are Todd, Dan, and Mary, I would like for 3 check
boxes to be created on Userform1. Checkbox1 would be
named Todd, Checkbox2 would be named Dan, and Checkbox3
would be named Mary.

It does not matter the position on the userform the
checkboxes are created, but preferably directly below the
first checkbox.


Thank you

Todd Huttenstine

Tom Ogilvy

Conditional Checkbox Creation on a UserForm
 
Why not use a listbox and set the liststyle property to fmListStyleOption
and the multiselect property to True.

This will list your names with checkboxes in front of them.

A lot easier than trying to manage a bunch of Checkboxes.

--
Regards,
Tom Ogilvy

"Todd Huttenstine" wrote in message
...
On my spreadsheet I have 3 sheets. Sheet2 is called "Team
Management Database". On Row 4 starting in column A, I
have names. I have a UserForm(UserForm1). I would like
for the code to look on Sheet2 and for each name it finds
in Row4, I would like it to create a checkbox with that
name, and place the checkbox on UserForm1. If the only
names are Todd, Dan, and Mary, I would like for 3 check
boxes to be created on Userform1. Checkbox1 would be
named Todd, Checkbox2 would be named Dan, and Checkbox3
would be named Mary.

It does not matter the position on the userform the
checkboxes are created, but preferably directly below the
first checkbox.


Thank you

Todd Huttenstine





All times are GMT +1. The time now is 11:57 AM.

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