Repeat data on all sheets
Hi Robert,
Am Sat, 31 Oct 2015 15:42:41 -0700 schrieb Robert Crandal:
So, for example, if a user changes A1 to "Claus" on Sheet 4
then the change should update A1 on all sheets. Or, if someone changes
A1 to "GS" on Sheet 1, then the change should update all sheets, etc....
sorry, I misunderstood your problem. If you want to change A1 for all
sheets from each sheet then try the following code in the
Workbook_SheetChange event:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Address(0, 0) < "A1" Then Exit Sub
Dim i As Long
Dim ShN As String
Application.EnableEvents = False
On Error GoTo CleanUp
ShN = Sh.Name
For i = 1 To 5
If Sheets(i).Name < ShN Then
Sheets(i).Range("A1") = Target.Value
End If
Next
CleanUp:
Application.EnableEvents = True
End Sub
Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
|