Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
File Name
I am trying to copy a workbook in a dir to another dir. The workbook I am
trying to copy is not the Active Workbook. I get this to work with a fixed name, but I need the name to change each time to the name in Cell (M9) of the Active Workbook. Code: FileCopy ActiveCell, "C:\Path\Dir\"ActiveSheet.Range("M9").Value.xl s"" My problem is adding the cell M9 to the path. What am I doing wrong. Any help is always apprectiated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
File Name
FileCopy ActiveCell, "C:\Path\Dir\" & ActiveSheet.Range("M9").Value & ".xls"
HTH "Ronbo" wrote: I am trying to copy a workbook in a dir to another dir. The workbook I am trying to copy is not the Active Workbook. I get this to work with a fixed name, but I need the name to change each time to the name in Cell (M9) of the Active Workbook. Code: FileCopy ActiveCell, "C:\Path\Dir\"ActiveSheet.Range("M9").Value.xl s"" My problem is adding the cell M9 to the path. What am I doing wrong. Any help is always apprectiated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
File:1 and File:2 -- Double Files when Opening One File | Excel Discussion (Misc queries) | |||
I saved file A over file B. Can I get file B back? | Excel Discussion (Misc queries) | |||
opening an excel file opens a duplicate file of the same file | Excel Discussion (Misc queries) | |||
I SAVED A FILE OVER ANOTHER A FILE IN EXCEL. THE OLD FILE WAS AN . | Excel Discussion (Misc queries) | |||
i received a file that reads powerpoint document file file exten. | Excel Discussion (Misc queries) |