close

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.
Sub backup()
With Workbooks(quot;filename.xlsquot;)
.SaveAs Format(.Worksheets(quot;sheet1quot;).Range(quot;A1quot;).Value) amp; quot;.xlsquot;
End With
End Sub

Hope this helps
replace the filename with your file name.quot;karenequot; wrote:

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

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

quot;flow23quot; wrote:

gt; Sub backup()
gt; With Workbooks(quot;filename.xlsquot;)
gt; .SaveAs Format(.Worksheets(quot;sheet1quot;).Range(quot;A1quot;).Value) amp; quot;.xlsquot;
gt; End With
gt; End Sub
gt;
gt; Hope this helps
gt; replace the filename with your file name.
gt;
gt;
gt; quot;karenequot; wrote:
gt;
gt; gt; I am new to macros and whish to set up a macro to save a spread sheet with a
gt; gt; backup. I have the cell A1 in the first worksheet giving the file name and
gt; gt; path etc.
gt; gt;
gt; gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()