View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Save as from a list

Just a typo and an alternate suggestion...

for i = 2 to aws.cells(rows.count,1).end(xlup)
should be:
for i = 2 to aws.cells(rows.count,1).end(xlup).row

And instead of using .saveas, how about .savecopyas?
Then the original workbook is undisturbed.

Barb Reinhardt wrote:

I can envision how I'd do this, but it would take some time to create the
code. This is what I'd do:

1) Create a workbook with the list of users ids that you want to use. I'd
probably call this aWB. Refer to the sheet with the user ids as aWS.
2) Create a macro to open the file that you want to perform the multiple
save as on. Use something like this
http://www.mrexcel.com/td0009.html
I'd probably refer to this workbook as oWB
3) Extract the user names from that worksheet. I'd put the first name in
row 2 column 1. I'd use something like

for i = 2 to aws.cells(rows.count,1).end(xlup)
fname = aws.cells(i,1).value
next i

4) WIthin the for/next loop, do the following

oWB.SaveAs Filename: fname

5) You could probably automate the emailing, but I've not done that in a
bit so am not sure where to start.

"KDP" wrote:

I have one workbook that I create every month and distribute to employees.
Every employee has their own version of this workbook.

Normally, I create the blank workbook and do a File-SaveAs (their operator
#/name).

Instead of doing this 30 times and saving as each persons name/number, is it
possible to key a list of their names and run a macro (or something else) to
automatically create a file with each persons name???


--

Dave Peterson