Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Select All checkboxes

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Select All checkboxes

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Select All checkboxes

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Select All checkboxes

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Select All checkboxes

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Select All checkboxes

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Checkboxes stretch Excel Worksheet Functions 4 September 14th 07 12:36 PM
checkboxes helpless101 Excel Worksheet Functions 0 April 10th 06 11:54 AM
Checkboxes Randy L Excel Discussion (Misc queries) 3 February 22nd 06 08:09 PM
CheckBoxes Laur Excel Discussion (Misc queries) 2 March 22nd 05 07:40 PM
Checkboxes chuck Excel Discussion (Misc queries) 1 January 25th 05 03:48 AM


All times are GMT +1. The time now is 07:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"