Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
J Shrimps, Jr.
 
Posts: n/a
Default Select all worksheets

Have spreadsheets with up to five
individual workheets. Some have
as few as three, but most have five.
Need to cut-and-paste all formulas
into values for each worksheet.
Tried to create a macro the selects
each worksheet, and pastes the
entire worksheet as values, but
each worksheet is named differently,
so the macro only works on one
spreadsheet (and there's 11 of them).
'Spoze I could write a macro that
renames each of the worksheets
as "Sheet1", "Sheet2", "Sheet3",
etc, copies the contents of each
worksheet, and then renames them
back, but that seems kind of excesssive.
Isn't there a way to iterate through each
worksheet in a spreadsheet,
without having to select the
worksheet by name?
Can't change the name of the individual
worksheets.


  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

No, just iterate through the worksheets collection in a For Each Next loop

For Each sh In Activeworkbook.Worksheets
sh,Cells.Copy
'etc
Next sh

--

HTH

RP
(remove nothere from the email address if mailing direct)


"J Shrimps, Jr." wrote in message
...
Have spreadsheets with up to five
individual workheets. Some have
as few as three, but most have five.
Need to cut-and-paste all formulas
into values for each worksheet.
Tried to create a macro the selects
each worksheet, and pastes the
entire worksheet as values, but
each worksheet is named differently,
so the macro only works on one
spreadsheet (and there's 11 of them).
'Spoze I could write a macro that
renames each of the worksheets
as "Sheet1", "Sheet2", "Sheet3",
etc, copies the contents of each
worksheet, and then renames them
back, but that seems kind of excesssive.
Isn't there a way to iterate through each
worksheet in a spreadsheet,
without having to select the
worksheet by name?
Can't change the name of the individual
worksheets.




Reply
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
Dynamic Formulas with Dynamic Ranges Ralph Howarth Excel Worksheet Functions 5 January 21st 05 08:44 AM
HELP! How do you--> Lock a set of rows but also link worksheets to FRUSTRATED Excel Discussion (Misc queries) 6 December 29th 04 10:05 PM
Sorting protected worksheets Drr Excel Discussion (Misc queries) 1 December 3rd 04 08:13 AM
Select all worksheets Phan Excel Worksheet Functions 0 November 10th 04 04:33 AM
How do I select all worksheets Phan Excel Worksheet Functions 0 November 10th 04 04:28 AM


All times are GMT +1. The time now is 08:13 PM.

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

About Us

"It's about Microsoft Excel"