Save Filename
Thanks Tom and Markus
I'll have a test run and see if more valium are needed, and the psych needs
a third session for this week.
Regards
Peter
"Markus Scheible" wrote:
Hi Peter,
try using a loop connected with the worksheet.visible
function as follows:
For Each Worksheet In Workbooks("abcd.xls")
If Worksheet.Visible = True Then
Worksheet.Copy
Workbooks("localcopyvisible.xls").Activate
Worksheet.Paste
Else
Worksheet.Copy
Workbooks("localcopyhidden.xls").Activate
Worksheet.Paste
End If
Next Worksheet
Sorry for double-Posting, missed some code ;o)
Best
Markus
-----Original Message-----
Hello All,
I have a workbook that has a heap of pages.
It is broken down into sheet names:
1-30 (visible)
1-30-Dock (hidden)
1-30-Delivery (hidden)
1-30-Admin (hidden)
Then continues onto the next set of four sheets, 31-60
etc.
The data from the visible sheet is copied onto the other
3 sheets.
Any sheets that are not used are deleted auto on exit,
with the rest being
saved to a single file.
What I need to know is...can i save a new workbook that
only contains the
visible sheets, then another with only the Dock sheets
etc etc.
The number of sheets used each time varies widely. But if
the visible sheet
is not used, then neither are the other 3 in the set
Confused...try being in my seat =)
Regards
Peter
.
|