bluepenink
Well-known Member
- Joined
- Dec 21, 2010
- Messages
- 585
Hello
How can i integrate the following macro to not run on the following sheets
Sheet1, Sheet75 (i will be creating more sheets so is it possible to have a macro that I can fill with the sheet# as i create them)
this is my macro
pls and thx u!!
How can i integrate the following macro to not run on the following sheets
Sheet1, Sheet75 (i will be creating more sheets so is it possible to have a macro that I can fill with the sheet# as i create them)
this is my macro
Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Excel.Range)
On Error GoTo Rename_Error
If Target.Address = "$C$4" And Len(Target.Value2) > 0 Then
With Target.Offset(, 2)
.Calculate
Sh.Name = .Value2
End With
End If
Exit Sub
Rename_Error:
MsgBox "The sheet name could not be renamed. Please check " & vbCrLf & _
"that you did not use illegal characters."
End Sub
pls and thx u!!