Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
I'd like to create a button that will "select all" checkboxes on a given worksheet. When I searched this group, I came across this posting that looks like exactly what I need: http://groups.google.com/group/micro...f0c0b1eaded911 However, I am not familiar with Visual Basic programming. When I copied and pasted the code, I get an error at start of the For Each command. What are "ctrl", "UserForm1" and "MSForms" pointing to? I assume those are the variables to be set. How do I set them? I appreciate any help or pointers where to search for help. Thank you, Nikki |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
That thread dealt with checkboxes on a userform--not checkboxes placed on a
worksheet. Where did you get your checkboxes that you placed on the worksheet--did you use the checkboxes from the Forms toolbar or did you use the checkboxes from the Control toolbox toolbar? Nikki wrote: Hi, I'd like to create a button that will "select all" checkboxes on a given worksheet. When I searched this group, I came across this posting that looks like exactly what I need: http://groups.google.com/group/micro...f0c0b1eaded911 However, I am not familiar with Visual Basic programming. When I copied and pasted the code, I get an error at start of the For Each command. What are "ctrl", "UserForm1" and "MSForms" pointing to? I assume those are the variables to be set. How do I set them? I appreciate any help or pointers where to search for help. Thank you, Nikki -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Dave,
I used the checkboxes from the Forms toolbar. I was unaware of a difference of a worksheet and userform; I am not familiar with userforms. Thank you, Nikki On Jun 3, 11:49*am, Dave Peterson wrote: That thread dealt with checkboxes on a userform--not checkboxes placed on a worksheet. Where did you get your checkboxes that you placed on the worksheet--did you use the checkboxes from the Forms toolbar or did you use the checkboxes from the Control toolbox toolbar? Nikki wrote: Hi, I'd like to create a button that will "select all" checkboxes on a given worksheet. When I searched this group, I came across this posting that looks like exactly what I need: http://groups.google.com/group/micro...isc/browse_thr... However, I am not familiar with Visual Basic programming. When I copied and pasted the code, I get an error at start of the For Each command. What are "ctrl", "UserForm1" and "MSForms" pointing to? I assume those are the variables to be set. How do I set them? I appreciate any help or pointers where to search for help. Thank you, Nikki -- Dave Peterson- Hide quoted text - - Show quoted text - |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Userforms are those things that look a lot like the Tools|Options dialog.
You could assign a macro like this to that master checkbox: Option Explicit Sub ToggleCheckboxes() Dim MstrCBX As CheckBox Set MstrCBX = ActiveSheet.CheckBoxes(Application.Caller) ActiveSheet.CheckBoxes.Value = MstrCBX.Value End Sub Nikki wrote: Dave, I used the checkboxes from the Forms toolbar. I was unaware of a difference of a worksheet and userform; I am not familiar with userforms. Thank you, Nikki On Jun 3, 11:49 am, Dave Peterson wrote: That thread dealt with checkboxes on a userform--not checkboxes placed on a worksheet. Where did you get your checkboxes that you placed on the worksheet--did you use the checkboxes from the Forms toolbar or did you use the checkboxes from the Control toolbox toolbar? Nikki wrote: Hi, I'd like to create a button that will "select all" checkboxes on a given worksheet. When I searched this group, I came across this posting that looks like exactly what I need: http://groups.google.com/group/micro...isc/browse_thr... However, I am not familiar with Visual Basic programming. When I copied and pasted the code, I get an error at start of the For Each command. What are "ctrl", "UserForm1" and "MSForms" pointing to? I assume those are the variables to be set. How do I set them? I appreciate any help or pointers where to search for help. Thank you, Nikki -- Dave Peterson- Hide quoted text - - Show quoted text - -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank for your reply. Once I found out how to assign a macro to a
checkbox, this code worked perfectly. Also, thank you for clarifying what a userform is. I did not know Excel could do something like that. Guess we learn a lot more than one thing each day! Nikki On Jun 3, 2:31*pm, Dave Peterson wrote: Userforms are those things that look a lot like the Tools|Options dialog. * You could assign a macro like this to that master checkbox: Option Explicit Sub ToggleCheckboxes() * * Dim MstrCBX As CheckBox * * Set MstrCBX = ActiveSheet.CheckBoxes(Application.Caller) * * ActiveSheet.CheckBoxes.Value = MstrCBX.Value End Sub Nikki wrote: Dave, I used the checkboxes from the Forms toolbar. I was unaware of a difference of a worksheet and userform; I am not familiar with userforms. Thank you, Nikki On Jun 3, 11:49 am, Dave Peterson wrote: That thread dealt with checkboxes on a userform--not checkboxes placed on a worksheet. Where did you get your checkboxes that you placed on the worksheet--did you use the checkboxes from the Forms toolbar or did you use the checkboxes from the Control toolbox toolbar? Nikki wrote: Hi, I'd like to create a button that will "select all" checkboxes on a given worksheet. When I searched this group, I came across this posting that looks like exactly what I need: http://groups.google.com/group/micro...isc/browse_thr.... However, I am not familiar with Visual Basic programming. When I copied and pasted the code, I get an error at start of the For Each command. What are "ctrl", "UserForm1" and "MSForms" pointing to? I assume those are the variables to be set. How do I set them? I appreciate any help or pointers where to search for help. Thank you, Nikki -- Dave Peterson- Hide quoted text - - Show quoted text - -- Dave Peterson- Hide quoted text - - Show quoted text - |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If you decide to look into userforms, you can start he
http://contextures.com/xlUserForm01.html (Debra Dalgleish's site) Nikki wrote: Thank for your reply. Once I found out how to assign a macro to a checkbox, this code worked perfectly. Also, thank you for clarifying what a userform is. I did not know Excel could do something like that. Guess we learn a lot more than one thing each day! Nikki On Jun 3, 2:31 pm, Dave Peterson wrote: Userforms are those things that look a lot like the Tools|Options dialog. You could assign a macro like this to that master checkbox: Option Explicit Sub ToggleCheckboxes() Dim MstrCBX As CheckBox Set MstrCBX = ActiveSheet.CheckBoxes(Application.Caller) ActiveSheet.CheckBoxes.Value = MstrCBX.Value End Sub Nikki wrote: Dave, I used the checkboxes from the Forms toolbar. I was unaware of a difference of a worksheet and userform; I am not familiar with userforms. Thank you, Nikki On Jun 3, 11:49 am, Dave Peterson wrote: That thread dealt with checkboxes on a userform--not checkboxes placed on a worksheet. Where did you get your checkboxes that you placed on the worksheet--did you use the checkboxes from the Forms toolbar or did you use the checkboxes from the Control toolbox toolbar? Nikki wrote: Hi, I'd like to create a button that will "select all" checkboxes on a given worksheet. When I searched this group, I came across this posting that looks like exactly what I need: http://groups.google.com/group/micro...isc/browse_thr... However, I am not familiar with Visual Basic programming. When I copied and pasted the code, I get an error at start of the For Each command. What are "ctrl", "UserForm1" and "MSForms" pointing to? I assume those are the variables to be set. How do I set them? I appreciate any help or pointers where to search for help. Thank you, Nikki -- Dave Peterson- Hide quoted text - - Show quoted text - -- Dave Peterson- Hide quoted text - - Show quoted text - -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Checkboxes | Excel Worksheet Functions | |||
checkboxes | Excel Worksheet Functions | |||
Checkboxes | Excel Discussion (Misc queries) | |||
CheckBoxes | Excel Discussion (Misc queries) | |||
Checkboxes | Excel Discussion (Misc queries) |