|
Anthony's VBA Forum Where the knowledge is shared |
|
|
View previous topic :: View next topic |
Author |
Message |
Nicky_5
Joined: 14 Aug 2008 Posts: 2
|
Posted: Thu Aug 14, 2008 6:05 am Post subject: Save workbook as multiple uniquely named workbooks |
|
|
Hi,
I am trying to write a macro that will open a workbook and then save it as something different, 150 times.
Please could you help me find a loop or bit of code that will allow me to do this?
Many thanks
Nicky |
|
Back to top |
|
|
mohan.ankur Moderator
Joined: 02 Aug 2006 Posts: 52
|
Posted: Tue Aug 19, 2008 1:56 pm Post subject: Code |
|
|
Sub Macro1()
For i = 1 To 150
YourPath = "Enter Your full path here like c:\abc\"
ActiveWorkbook.SaveAs Filename:= _
YourPath & i & ".xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False
Next i
End Sub
Try manipulating this a bit
Ankur _________________ http://www.exceldepot.com
http://www.xlmacros.com
http://www.learnexcel.org |
|
Back to top |
|
|
Nicky_5
Joined: 14 Aug 2008 Posts: 2
|
Posted: Wed Aug 20, 2008 3:16 am Post subject: |
|
|
Hi,
thats great! thank you
Nicky |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2002 phpBB Group
|