LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 363
Default Togglebutton to change Checkboxes

I am trying to get a toggle button when pressed to tick ALL checkboxes(17) on a form, but cannot get
it to change them.

I am using:

Private Sub ToggleButton1_Click()
If ToggleButton1 Then
CheckBox1 = True And CheckBox2 = True And CheckBox3 = True And CheckBox4 = True And CheckBox5 = True
And CheckBox6 = True And _
CheckBox7 = True And CheckBox8 = True And CheckBox9 = True And CheckBox10 = True And CheckBox11 =
True And CheckBox12 = True And _
CheckBox13 = True And CheckBox14 = True And CheckBox15 = True And CheckBox16 = True And CheckBox17
= True
Else
CheckBox1 = False And CheckBox2 = False And CheckBox3 = False And CheckBox4 = False And CheckBox5 =
False And CheckBox6 = False And _
CheckBox7 = False And CheckBox8 = False And CheckBox9 = False And CheckBox10 = False And CheckBox11
= False And CheckBox12 = False And _
CheckBox13 = False And CheckBox14 = False And CheckBox15 = False And CheckBox16 = False And
CheckBox17 = False
End If
End Sub


WHY does it not work?

Corey....


 
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
Help with togglebutton that displays jpg caj Excel Discussion (Misc queries) 2 March 7th 07 02:44 PM
need help with togglebutton Gary Keramidas[_2_] Excel Programming 7 July 9th 05 04:15 PM
On Change (Checkboxes) or something similar. David Excel Programming 5 May 12th 05 06:52 PM
Change event for multiple checkboxes Harald Witmer Excel Programming 2 August 27th 03 12:15 AM


All times are GMT +1. The time now is 11:45 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"