Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
File Naming
I wish to have a macro save a file name as a value within a cell. I'm not
sure where to go with this. I figured I could select the range and set it as MyValue, then use the savecopy as method, but I can't figure out how to get the MyValue in there as the file name... MyValue = Range("A1").Value ActiveWorkbook.SaveCopyAs "C:\Documents and Settings\Desktop\MyValue.xls" this is where I can't figure out how to get the MyValue in there as the filename. If I put it like this, the file is saved as MyValue.xls literally, and I want it to be the actual value within that range... Any ideas? Thanks!!! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
File Naming
try
MyValue = Range("A1") & ".xls" ActiveWorkbook.SaveCopyAs "C:\Documents and Settings\Desktop\" & myvalue -- Don Guillett SalesAid Software "bodhisatvaofboogie" wrote in message ... I wish to have a macro save a file name as a value within a cell. I'm not sure where to go with this. I figured I could select the range and set it as MyValue, then use the savecopy as method, but I can't figure out how to get the MyValue in there as the file name... MyValue = Range("A1").Value ActiveWorkbook.SaveCopyAs "C:\Documents and Settings\Desktop\MyValue.xls" this is where I can't figure out how to get the MyValue in there as the filename. If I put it like this, the file is saved as MyValue.xls literally, and I want it to be the actual value within that range... Any ideas? Thanks!!! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
File Naming
Maybe this:
MyValue = Range("A1").Value ActiveWorkbook.SaveCopyAs "C:\Documents and Settings\Desktop\" & MyValue & ".xls" "bodhisatvaofboogie" wrote: I wish to have a macro save a file name as a value within a cell. I'm not sure where to go with this. I figured I could select the range and set it as MyValue, then use the savecopy as method, but I can't figure out how to get the MyValue in there as the file name... MyValue = Range("A1").Value ActiveWorkbook.SaveCopyAs "C:\Documents and Settings\Desktop\MyValue.xls" this is where I can't figure out how to get the MyValue in there as the filename. If I put it like this, the file is saved as MyValue.xls literally, and I want it to be the actual value within that range... Any ideas? Thanks!!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Reverse naming of file | New Users to Excel | |||
Auto file naming | Excel Discussion (Misc queries) | |||
File naming conventions | Excel Discussion (Misc queries) | |||
Naming a file with the same name as the folder | Excel Programming | |||
Naming File from a Cell | Excel Programming |