wirelessworld
New member
- Joined
- May 21, 2012
- Messages
- 3
- Reaction score
- 0
- Points
- 0
Use code to make dyn file names from cell contents and save to dyn dir
Hey Ken,
Quick question for ya (I'm sure not a quick answer tho....)
I would like to know what I will need to modify in your code to save a pdf with its name derived from a cell in the active sheet.
For example:
I have a sheet with a cell that contains a concatentation of things from other cells:
Sheet1!A5 = JoeSmith_12345_BillingStatement_05-21-2012
Thus I want the file name to be:
*CustomerName*_*CustomerAcctNumber*_BillingStatement_MM-DD-YYYY.pdf
and be saved to a UNC path:
\\ data \ wireless \ receivable \ *CustomerName* \ *CustomerName_YYYY*
so when you looke at the full path to the file you see:
UNCPath\ *CustomerName*_*CustomerAcctNumber*_BillingStatement_MM-DD-YYYY.pdf
Please note that that the items between the *'s are variable and are derived from other areas of the same sheet.
One other nice thing would be if the dir does not exist then mkdir on the fly without user intervention being needed.
I also will need to know what module I will need to palce the code for it to work. Thank a million in advance!!
- Jerry L Englehaupt
Wireless World
Hey Ken,
Quick question for ya (I'm sure not a quick answer tho....)
I would like to know what I will need to modify in your code to save a pdf with its name derived from a cell in the active sheet.
For example:
I have a sheet with a cell that contains a concatentation of things from other cells:
Sheet1!A5 = JoeSmith_12345_BillingStatement_05-21-2012
Thus I want the file name to be:
*CustomerName*_*CustomerAcctNumber*_BillingStatement_MM-DD-YYYY.pdf
and be saved to a UNC path:
\\ data \ wireless \ receivable \ *CustomerName* \ *CustomerName_YYYY*
so when you looke at the full path to the file you see:
UNCPath\ *CustomerName*_*CustomerAcctNumber*_BillingStatement_MM-DD-YYYY.pdf
Please note that that the items between the *'s are variable and are derived from other areas of the same sheet.
One other nice thing would be if the dir does not exist then mkdir on the fly without user intervention being needed.
I also will need to know what module I will need to palce the code for it to work. Thank a million in advance!!
- Jerry L Englehaupt
Wireless World