Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
karene
 
Posts: n/a
Default macro save a file name from a cell in 1st worksheet

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.


  #2   Report Post  
Posted to microsoft.public.excel.misc
flow23
 
Posts: n/a
Default macro save a file name from a cell in 1st worksheet

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.


"karene" wrote:

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.


  #3   Report Post  
Posted to microsoft.public.excel.misc
karene
 
Posts: n/a
Default macro save a file name from a cell in 1st worksheet

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

"flow23" wrote:

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.


"karene" wrote:

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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro save a workbook whilst increasing file no shrek Excel Worksheet Functions 0 November 10th 05 02:40 PM
save original data after macro is run again MINAL ZUNKE New Users to Excel 3 July 7th 05 12:48 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
Automatically save file based on cell value Craig Excel Discussion (Misc queries) 0 February 27th 05 10:01 PM
This one is tricky....Macro to save file as cell value x in di Andy Excel Discussion (Misc queries) 4 November 26th 04 08:52 AM


All times are GMT +1. The time now is 09:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"