LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.misc
mrice
 
Posts: n/a
Default Linked Check Boxes


To keep groups separate, you need to duplicate the code with the same
macro using (say) C5- C8 and opposed to C1-C4. There is only one
worksheet_calculate event to play with.

Dim Calculating As Boolean


Private Sub Worksheet_Calculate()
If Calculating = True Then Exit Sub


If Range("C1").Value = True Then
Calculating = True
Range("C2") = True
Range("C3") = True
Range("C4") = True
Calculating = False
Exit Sub
End If

If Range("C2").Value = True Then
Calculating = True
Range("C3") = True
Range("C4") = True
Calculating = False
Exit Sub
End If

If Range("C3").Value = True Then
Calculating = True
Range("C4") = True
Calculating = False
Exit Sub
End If

'second block

If Range("C5").Value = True Then
Calculating = True
Range("C6") = True
Range("C7") = True
Range("C8") = True
Calculating = False
Exit Sub
End If

If Range("C6").Value = True Then
Calculating = True
Range("C7") = True
Range("C8") = True
Calculating = False
Exit Sub
End If

If Range("C7").Value = True Then
Calculating = True
Range("C8") = True
Calculating = False
Exit Sub
End If

'further blocks go here

End Sub


Don't worry about clicking the No button - :) :)


--
mrice

Research Scientist with many years of spreadsheet development experience
------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=533928



 
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
Can one cell hold multiple check boxes (and then sort based off e. OT Excel Discussion (Misc queries) 1 March 29th 06 07:32 PM
Is there a way to add up check boxes strider11580 Excel Discussion (Misc queries) 2 January 24th 06 04:37 AM
Can you sort with check boxes? Q Excel Discussion (Misc queries) 3 November 10th 05 08:11 PM
Column of check boxes DavidE Excel Worksheet Functions 2 July 15th 05 12:46 AM
Count Check Boxes Tony Excel Worksheet Functions 4 April 12th 05 05:58 PM


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