Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default Is there an easier way of doing this??

I have checkboxes ,located in cells J95:J110, that will highlight a range of
cells in a row if it is checked. My range is being highlighted is E95:I110

Everytime the checkbox is checked the specific row range next to it
highlights using conditional formatting.

Currently to get this work i have the checkbox tell a cell next to the
checkbox (cells H95:H110) to be True or False. So if the checkbox is check
the cell next to it is true, and through conditional formatting highlight the
cells. Also if that the checkbox is true, all the other checkboxes are false.

For example, I have a checkbox is J96, if i check it, E96:I96 are
highlighted, all the other checkboxes are false and thoughs ranges are
unhighlighted.

So here is my current code, and i was wondering if there is a faster or more
easier way to write this.

Private Sub CheckBox1_Click()
ActiveSheet.Unprotect
Select Case CheckBox1.Value
Case Is = True
Worksheets("BID RECAP SUMMARY").Range("K93") = "TRUE"
CheckBox2.Value = False
CheckBox3.Value = False
CheckBox4.Value = False
CheckBox5.Value = False
CheckBox6.Value = False
CheckBox7.Value = False
CheckBox8.Value = False
CheckBox9.Value = False
CheckBox10.Value = False
CheckBox11.Value = False
CheckBox12.Value = False
CheckBox13.Value = False
CheckBox14.Value = False
CheckBox15.Value = False
CheckBox16.Value = False
Case Is = False
Worksheets("BID RECAP SUMMARY").Range("K93") = "FALSE"
End Select
ActiveSheet.Protect
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default Is there an easier way of doing this??

Easier would be to use option buttons. Clicking one unclicks the other...
--
HTH...

Jim Thomlinson


"Andy" wrote:

I have checkboxes ,located in cells J95:J110, that will highlight a range of
cells in a row if it is checked. My range is being highlighted is E95:I110

Everytime the checkbox is checked the specific row range next to it
highlights using conditional formatting.

Currently to get this work i have the checkbox tell a cell next to the
checkbox (cells H95:H110) to be True or False. So if the checkbox is check
the cell next to it is true, and through conditional formatting highlight the
cells. Also if that the checkbox is true, all the other checkboxes are false.

For example, I have a checkbox is J96, if i check it, E96:I96 are
highlighted, all the other checkboxes are false and thoughs ranges are
unhighlighted.

So here is my current code, and i was wondering if there is a faster or more
easier way to write this.

Private Sub CheckBox1_Click()
ActiveSheet.Unprotect
Select Case CheckBox1.Value
Case Is = True
Worksheets("BID RECAP SUMMARY").Range("K93") = "TRUE"
CheckBox2.Value = False
CheckBox3.Value = False
CheckBox4.Value = False
CheckBox5.Value = False
CheckBox6.Value = False
CheckBox7.Value = False
CheckBox8.Value = False
CheckBox9.Value = False
CheckBox10.Value = False
CheckBox11.Value = False
CheckBox12.Value = False
CheckBox13.Value = False
CheckBox14.Value = False
CheckBox15.Value = False
CheckBox16.Value = False
Case Is = False
Worksheets("BID RECAP SUMMARY").Range("K93") = "FALSE"
End Select
ActiveSheet.Protect
End Sub

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
An easier way? Pyrite Excel Discussion (Misc queries) 9 October 8th 08 09:05 PM
There's Got to be an Easier Way Sprint54 Excel Discussion (Misc queries) 7 February 9th 06 12:06 AM
Easier Way to do it? Kurt Barr Excel Programming 3 January 13th 06 06:20 PM
Is there an easier way? wmaughan Excel Discussion (Misc queries) 5 December 27th 05 10:56 PM
Easier way? davegb Excel Programming 4 December 9th 05 06:47 PM


All times are GMT +1. The time now is 03:48 PM.

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

About Us

"It's about Microsoft Excel"