File Name

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.xls""

My problem is adding the cell M9 to the path. What am I doing wrong.

Any help is always apprectiated.
 
FileCopy ActiveCell, "C:\Path\Dir\" & ActiveSheet.Range("M9").Value & ".xls"

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top