Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default sheets that mirror each other

Yes, that seems to do it:
sheet1 code

Private Sub Worksheet_Change(ByVal Target As Range)
If Application.ActiveSheet.CodeName = "Sheet1" Then
Sheet2.Range(Target.Address).Value = Target.Value
Else
Exit Sub
End If
'MsgBox ("Im in Sheet1")
End Sub

sheet2 code

Private Sub Worksheet_Change(ByVal Target As Range)
If Application.ActiveSheet.CodeName = "Sheet2" Then
Sheet1.Range(Target.Address).Value = Target.Value
Else
Exit Sub
End If
'MsgBox ("Im in Sheet2")
End Sub

Mike F
"Robert Crandal" wrote in message
...
How about the following code in the Worksheet_Change()
for Sheet1:

If Application.ActiveSheet.CodeName = "Sheet1" Then
' copy data to Sheet2
End if

Then, in the code for Worksheet_Change() for Sheet2,
use the following:

If Application.ActiveSheet.CodeName = "Sheet2" Then
' copy data to Sheet1
End if

What do you think about that idea??


"Mike Fogleman" wrote in message
...
Let me study this once more. There must be a way, maybe with an IF
statement.

Mike F
"Robert Crandal" wrote in message
...
Try putting a MsgBox("Im in Sheet1") statement in the
Worksheet_Change() function for sheet1. It will
give you about 45 message boxes/dialog boxes that
say "I'm in Sheet1". It appears that Excel runs out of
stack space at that point.




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
synchronizing mutiple sheets to mirror the previous data FEMoore Excel Discussion (Misc queries) 0 October 10th 10 03:49 PM
Mirror View Dattatraya Excel Discussion (Misc queries) 2 May 19th 10 07:45 PM
Mirror Cells Nicolas Cachanosky Excel Programming 3 January 29th 07 05:05 PM
Mirror spreadsheet? Rykar2 Excel Discussion (Misc queries) 4 November 12th 05 03:50 AM
2 mirror files with :1 and :2 - why? DJR Excel Discussion (Misc queries) 3 March 21st 05 06:05 PM


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