Cell Contents Saved in File Name?

  • Thread starter Thread starter Laurie Pasion
  • Start date Start date
L

Laurie Pasion

I have a macro that automatically saves a purchase order
file with the name of the sales rep, but I want it to
also include a value they enter in a particular cell of
the worksheet. How do you write the code for

"ActiveWorkbook.SaveAs "C:\foldername\Order No."
& "RepNumber" & contents of cell C16 & xls."

I have the rep number written uniquely into the macro for
each rep's template, but can't figure how to get the
saved file name to pickup the **contents of cell C16**
which is an alpha-numeric entry identifying the account.

Help is much appreciated. Have learned tons reading
questions & answers on this site.
LP
 
Laurie Pasion said:
I have a macro that automatically saves a purchase order
file with the name of the sales rep, but I want it to
also include a value they enter in a particular cell of
the worksheet. How do you write the code for

"ActiveWorkbook.SaveAs "C:\foldername\Order No."
& "RepNumber" & contents of cell C16 & xls."

I have the rep number written uniquely into the macro for
each rep's template, but can't figure how to get the
saved file name to pickup the **contents of cell C16**
which is an alpha-numeric entry identifying the account.

Help is much appreciated. Have learned tons reading
questions & answers on this site.
LP

Try this:

Range("C16").Value


HTH,

Alan.
 
Back
Top