I'm just trying to keep my sheet numbers straight when I delet them with a macro. Can someone please tell me why this will not work? If I do 1 to n I get a subscript out of range.
Sub dude()
Application.DisplayAlerts = False
Dim mycount As Integer
Dim n As Integer
For Each ws In Sheets
n = n + 1
For mycount = n to 2
Sheets(mycount).Delete
Next mycount
Next ws
End Sub
I may not be very smart but I'm sure wirey!!!!
Sub dude()
Application.DisplayAlerts = False
Dim mycount As Integer
Dim n As Integer
For Each ws In Sheets
n = n + 1
For mycount = n to 2
Sheets(mycount).Delete
Next mycount
Next ws
End Sub
I may not be very smart but I'm sure wirey!!!!