Creating new files using VBA

prasjohn

New Member
Joined
Aug 26, 2015
Messages
4
Hi all, I have a requirement.. File names are mentioned from A2 column onwards, and based on the names and extension, the program should create files and store in a specified location.... File names may be like, MyBook1.xls, Mywordbook.doc, Myfinal.pdf etc... Location could be just C: drive. Any help will be appreciated.... Regards ...
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Perhaps you can give more information about what you are trying to do.
Are those files going to be empty or will they have content (if so, where from)?
What version of Office are you using and are you using any specific PDF software?
 
Last edited:
Upvote 0
Hi Derek,
I could manage to get this done.. However, i wanted to thank you for looking to my request.. I did using the following script...
'Dim lRow, x As Integer
'Dim wbName As String


'lRow = Range("A" & Rows.Count).End(xlUp).Row
'x = 1
'Do
' x = x + 1
' wbName = Range("A" & x).Value
' ActiveWorkbook.SaveAs Filename:="C:\Users\pjohn\Desktop" & wbName & ".xls"
'Loop Until x = lRow
'ActiveWorkbook.Close


Thanks once again... Merry X mas..!!
 
Upvote 0

Forum statistics

Threads
1,214,385
Messages
6,119,208
Members
448,874
Latest member
b1step2far

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top