Need a to automatically create a new excel from every sheet
Sub Make_New_Books()
Dim w As Worksheet
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each w In ActiveWorkbook.Worksheets
w.Copy
ActiveWorkbook.SaveAs FileName:=ThisWorkbook.Path _
& "\" & w.Name
'ActiveWorkbook.SaveAs FileName:="C:\yourfolder\" _
'& "\" & w.Name
ActiveWorkbook.Close
Next w
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
Gord Dibben MS Excel MVP
On Mon, 28 Jan 2008 12:57:44 -0800 (PST), benny wrote:
hi all
A customer sends us an excel file with over 20 sheets in it.
In order to upload it to our main server in need to manually create a
separate excel file from every sheet and name it by the name of the
sheet.
only then i can upload every excel to a separate table in the
database.
is there any way to do it automatically ?
thanks in advance
benny
|