Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i create a series of checkboxes dynamically.
Set newButton5 = Me.Controls.Add("Forms.checkbox.1") newButton5.Value = False With newButton5 .name = checkbox & i & "C" End With i know how to get the value of these controls, but how do i act on an event? "Private Sub Checkbox1c _click()" doesn't work. -- Gary |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Don't create them dynamically, create them in design, and setup the click
events, and hide them, unhiding when required. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... i create a series of checkboxes dynamically. Set newButton5 = Me.Controls.Add("Forms.checkbox.1") newButton5.Value = False With newButton5 .name = checkbox & i & "C" End With i know how to get the value of these controls, but how do i act on an event? "Private Sub Checkbox1c _click()" doesn't work. -- Gary |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i never know how many there is going to be. there might be 4 might be 40
-- Gary "Bob Phillips" wrote in message ... Don't create them dynamically, create them in design, and setup the click events, and hide them, unhiding when required. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... i create a series of checkboxes dynamically. Set newButton5 = Me.Controls.Add("Forms.checkbox.1") newButton5.Value = False With newButton5 .name = checkbox & i & "C" End With i know how to get the value of these controls, but how do i act on an event? "Private Sub Checkbox1c _click()" doesn't work. -- Gary |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
So create 40 and unhide the ones you want.
-- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... i never know how many there is going to be. there might be 4 might be 40 -- Gary "Bob Phillips" wrote in message ... Don't create them dynamically, create them in design, and setup the click events, and hide them, unhiding when required. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... i create a series of checkboxes dynamically. Set newButton5 = Me.Controls.Add("Forms.checkbox.1") newButton5.Value = False With newButton5 .name = checkbox & i & "C" End With i know how to get the value of these controls, but how do i act on an event? "Private Sub Checkbox1c _click()" doesn't work. -- Gary |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
you know, i wondered if that's what you were going to say<g
-- Gary "Bob Phillips" wrote in message ... So create 40 and unhide the ones you want. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... i never know how many there is going to be. there might be 4 might be 40 -- Gary "Bob Phillips" wrote in message ... Don't create them dynamically, create them in design, and setup the click events, and hide them, unhiding when required. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... i create a series of checkboxes dynamically. Set newButton5 = Me.Controls.Add("Forms.checkbox.1") newButton5.Value = False With newButton5 .name = checkbox & i & "C" End With i know how to get the value of these controls, but how do i act on an event? "Private Sub Checkbox1c _click()" doesn't work. -- Gary |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Honestly Gary, it is the best way. Creating controls on the fly is bad news,
hard to manage, hard to maintain. If all the controls react the same way, you can use application events to easily control them. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... you know, i wondered if that's what you were going to say<g -- Gary "Bob Phillips" wrote in message ... So create 40 and unhide the ones you want. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... i never know how many there is going to be. there might be 4 might be 40 -- Gary "Bob Phillips" wrote in message ... Don't create them dynamically, create them in design, and setup the click events, and hide them, unhiding when required. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... i create a series of checkboxes dynamically. Set newButton5 = Me.Controls.Add("Forms.checkbox.1") newButton5.Value = False With newButton5 .name = checkbox & i & "C" End With i know how to get the value of these controls, but how do i act on an event? "Private Sub Checkbox1c _click()" doesn't work. -- Gary |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
add dynamic control (checkbox) | Excel Programming | |||
checkbox on form reset from checkbox on sheet | Excel Programming | |||
Dynamic Controls (CheckBox) using VBA in Excel | Excel Programming | |||
Add Checkbox programatically to form | Excel Programming | |||
creating checkbox through form | Excel Programming |