Hey all,
I am having trouble with this code.The red highlighted line is giving me a Run Time Error 424 (Object Required)
What the code should do is select the same column across multiple sheets. However if the SheetChange value was on the same column as the previous SheetChange value, then the code should not run again until a new column's value been entered.
B2 = new value , B3 = old value
Formula in B4 => B2-B3 = 0
will appreciate any help.
Thanks
I am having trouble with this code.The red highlighted line is giving me a Run Time Error 424 (Object Required)
Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Application.EnableEvents = False
Worksheets("HSheet").[B3] = Worksheets("HSheet").[B2]
Worksheets("HSheet").[B2] = Target.Column
Application.EnableEvents = True
Set Target = Worksheets("HSheet").[B4]
If Target.Value <> 0 Then
Dim ws As Worksheet
For Each ws In Sheets
ws.Select
[COLOR=#ff0000][B] [U]Cells(ActiveCell.Row, Source.Column).Select[/U][/B][/COLOR]
Next
Sh.Select
End If
End Sub
What the code should do is select the same column across multiple sheets. However if the SheetChange value was on the same column as the previous SheetChange value, then the code should not run again until a new column's value been entered.
B2 = new value , B3 = old value
Formula in B4 => B2-B3 = 0
will appreciate any help.
Thanks
Last edited: