LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 53
Default Copy Range Data Macro

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:P23").Select
Selection.ClearContents
Range("A1:D2").Select
Sheets("Stats").Select
Range("A1:D1").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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro to copy from excel range to word doc mopgcw Excel Discussion (Misc queries) 1 August 20th 07 07:54 PM
Need help - Macro to copy a specific range Dileep Chandran Excel Worksheet Functions 9 December 5th 06 09:10 AM
Need help - Macro to copy a specific range Dileep Chandran Excel Worksheet Functions 0 December 4th 06 10:24 AM
MACRO TO COPY TO A RANGE asuncionw Excel Discussion (Misc queries) 3 February 9th 06 04:39 PM
Macro to copy range of formulas to equal data lines lh Excel Worksheet Functions 2 August 15th 05 04:37 PM


All times are GMT +1. The time now is 11:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"