Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXCEL SHEETS

Status
Not open for further replies.

LinuxGuy

Programmer
Nov 18, 2002
37
US
how can i save the current workbook Sheets to a whole new
independant XLS File...
 
From the File menu - Save As - then give it a different name. Regards
BrianB
** Let us know if you get something that works !
================================
 
Oh My ROTFL ; i really should have explained My need a little Better Perhaps..
umm i need to save My Currrent Worksheets In my workBook AS Seprate
XLS Workbooks themselves...so each Worksheet Is a different XLS File..
i need to Perform this thru VBA Code...As in MACROS..
(" there does that help")

 
You'll make a name for yourself by posting like that (tsk, tsk!)

Public Sub saveAllWorkbooks()
Dim i As Integer
Dim w As Workbook
i = 1
For Each w In Workbooks
If (w.Name <> ThisWorkbook.Name) Then
w.SaveAs &quot;C:\LOG&quot; & i & &quot;.xls&quot;
w.Save
i = i + 1
MsgBox w.Name & &quot;is saved!&quot; & vbCrLf & &quot;Praise the Lord!&quot;
Windows(w.Name).Close
End If
Next w
End Sub

This subroutine has been brought to you by the letter w and the number 6.
D. &quot;I want to play...&quot;
(Guess the X-Files episode!)
 
Sub saveAllSheets()
Application.ScreenUpdating = False
For Each sht In ActiveWorkbook.Worksheets
sht.Copy
ActiveWorkbook.SaveAs &quot;C:\Temp\&quot; & sht.Name & &quot;.xls&quot;
ActiveWorkbook.Close
Next
MsgBox &quot;Now all the worksheets are saved as&quot; & vbCrLf & &quot;seperate workbooks as per your request&quot;
End Sub
Rgds
~Geoff~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top