W
webels
HI
This is a piece of code written by Dave Peterson, it works perfect for
my needs.
Option Explicit
Sub testme01()
Dim wks As Worksheet
For Each wks In ActiveWorkbook.Worksheets
With wks
On Error Resume Next
..Name = .Range("b4").Text
If Err.Number <> 0 Then
MsgBox .Name & " was not renamed"
Err.Clear
End If
On Error GoTo 0
End With
Next wks
End Sub
However what I would like to also do would be to delete a worksheet if
the is no value in cell b4.
Many thanks for any suggestions.
Thanks
Eddie
This is a piece of code written by Dave Peterson, it works perfect for
my needs.
Option Explicit
Sub testme01()
Dim wks As Worksheet
For Each wks In ActiveWorkbook.Worksheets
With wks
On Error Resume Next
..Name = .Range("b4").Text
If Err.Number <> 0 Then
MsgBox .Name & " was not renamed"
Err.Clear
End If
On Error GoTo 0
End With
Next wks
End Sub
However what I would like to also do would be to delete a worksheet if
the is no value in cell b4.
Many thanks for any suggestions.
Thanks
Eddie