LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Connecting two checkboxes on different sheets


To keep it simple:

On sheet1:
Private Sub CheckBox1_Click()
Sheet2.CheckBox1 = CheckBox1
End Sub

and on Sheet2:
Private Sub CheckBox1_Click()
Sheet1.CheckBox1 = CheckBox1
End Sub

you'll need three sets of these - one for each CheckBox.

HTH

Tim




"ph8" wrote in message
...

Hi folks,

I have two sets of three checkboxes on two different worksheets (in the
same workbook) that I need displaying the same information.

I tried linking both corresponding checkboxes to the same cell, but I
wasn't able to link them to a cell in another worksheet. I tried
linking them to local cells and using formulas in the cell to keep the
checkboxes in sync. But that only worked one way. This is my most
recent attempt, which also resulted in not working.

'Sheet2 code
Private Sub ocb_click()
Cells(11, "a") = "='sheet1'!$A$11"
Sheet1.clickKeyCB()
End Sub

'Sheet1 code
Function clickKeyCB()
Dim x As Boolean
x = Cells(11, "A"): x = (x + 3) Mod 2: Cells(11, "A") = x
End Function

The code seemed to work, but for some reason, even though both
checkboxes are both still linked to their corresponding A11 cell, the
checkbox's value does not change between true or false.

Any ideas? Maybe I am going about this the wrong way, I'm all ears to
any suggestions.


--
ph8
------------------------------------------------------------------------
ph8's Profile:

http://www.excelforum.com/member.php...o&userid=19871
View this thread: http://www.excelforum.com/showthread...hreadid=515291



 
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
Connecting a master sheet to other sheets within the same workbook ~genevieve[_2_] Excel Discussion (Misc queries) 2 September 17th 09 08:58 AM
Connecting Excel sheets to Access Tables??? Dave Excel Discussion (Misc queries) 1 January 9th 09 11:44 PM
need code for hiding/unhiding sheets using checkboxes pzx8hf Excel Worksheet Functions 1 August 13th 08 12:11 AM
connecting multiple work sheets fyon Excel Programming 1 January 5th 05 04:50 AM
Deleting Sheets based on checkboxes being unchecked Tip Top Excel Programming 4 June 28th 04 02:53 PM


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