hamiltonhere
New Member
- Joined
- Aug 24, 2023
- Messages
- 2
- Office Version
- 365
Hello,
I have the following code that only works if I am referring to a cell on the same worksheet that the code is being used on. I would like Range("A1") to actually be Cell B10 on a worksheet which is called "Master". How would I alter this code to accomplish this? Thanks in advance!
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1")) Is Nothing Then
If Range("A1") = Empty Then
ActiveSheet.name = "Client Unspecified-" & ActiveSheet.Index
Else
ActiveSheet.name = Range("A1")
End If
End If
End Sub
I have the following code that only works if I am referring to a cell on the same worksheet that the code is being used on. I would like Range("A1") to actually be Cell B10 on a worksheet which is called "Master". How would I alter this code to accomplish this? Thanks in advance!
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1")) Is Nothing Then
If Range("A1") = Empty Then
ActiveSheet.name = "Client Unspecified-" & ActiveSheet.Index
Else
ActiveSheet.name = Range("A1")
End If
End If
End Sub