macro save a file name from a cell in 1st worksheet

G

Guest

I am new to macros and whish to set up a macro to save a spread sheet with a
backup. I have the cell A1 in the first worksheet giving the file name and
path etc.
 
G

Guest

Sub backup()
With Workbooks("filename.xls")
.SaveAs Format(.Worksheets("sheet1").Range("A1").Value) & ".xls"
End With
End Sub

Hope this helps
replace the filename with your file name.
 
G

Guest

This is not quite what I think I was trying to do. I have saved a recored
macro and changed create a backup to true so this bit works but the macro is
using the specific file name that i recorded the macro on. I have in cell A1
on my first worksheet, the file and path name that I would like the macro to
use, but can't seem to get it to understand me! Does this make sense ?
Thanks
 

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

Top