C
Cheri
I had requested information on how to name the tabs in a worksheet from a
list. I got a great response:
Sub namesheets()
For i = 1 To 18
Sheets("sheet" & i).Name = Cells(i, "a")
Next i
End Sub
Now what I need to know how to do is change my macro that copies from one
sheet to the other to adjust to whatever the new tab name is.
My macro currently is:
Sub ClearSheets()
'
' ClearSheets Macro
' Macro recorded 6/2/2007 by n0082840
'
'
Sheets(Array("Cutter", "Emrick", "Goble", "Heiser", "Keigley",
"Leonard", "Newcomb", _
"Nobles", "Patton", "Riley", "Steinike", "Watkins", "Woodhall",
"Template")).Select
Sheets("Cutter").Activate
Range("A6
23").Select
Selection.ClearContents
Range("A1
2").Select
Sheets("Stats").Select
Range("A1
1").Select
End Sub
Needless to say, this won't work with new names for each worksheet. What
VBA code do I need to have it merely select the next worksheet regardless of
the name?
Thanks ahead of time!!
Cheri
list. I got a great response:
Sub namesheets()
For i = 1 To 18
Sheets("sheet" & i).Name = Cells(i, "a")
Next i
End Sub
Now what I need to know how to do is change my macro that copies from one
sheet to the other to adjust to whatever the new tab name is.
My macro currently is:
Sub ClearSheets()
'
' ClearSheets Macro
' Macro recorded 6/2/2007 by n0082840
'
'
Sheets(Array("Cutter", "Emrick", "Goble", "Heiser", "Keigley",
"Leonard", "Newcomb", _
"Nobles", "Patton", "Riley", "Steinike", "Watkins", "Woodhall",
"Template")).Select
Sheets("Cutter").Activate
Range("A6
Selection.ClearContents
Range("A1
Sheets("Stats").Select
Range("A1
End Sub
Needless to say, this won't work with new names for each worksheet. What
VBA code do I need to have it merely select the next worksheet regardless of
the name?
Thanks ahead of time!!
Cheri