#1   Report Post  
AJM1949
 
Posts: n/a
Default Auto Save on closing

I would like to auto save an excel workbook using a cell value as the file
name and save it in a specific folder ie My Documents\Quotes. I have been
unable to find an answer to this in previous responses. Any help would be
very much appreciated.

Thanks in advance
--
AJM1949
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.SaveAs Filename:=Worksheets("Sheet1").Range("A1").Value
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
HTH

Bob Phillips

"AJM1949" wrote in message
...
I would like to auto save an excel workbook using a cell value as the file
name and save it in a specific folder ie My Documents\Quotes. I have been
unable to find an answer to this in previous responses. Any help would be
very much appreciated.

Thanks in advance
--
AJM1949



  #3   Report Post  
AJM1949
 
Posts: n/a
Default

Hello Bob
Many thanks for the code. How can I specify the path to save the workbook
to-in this instance I want it to be My Documents\Quotes.
--
AJM1949


"Bob Phillips" wrote:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.SaveAs Filename:=Worksheets("Sheet1").Range("A1").Value
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
HTH

Bob Phillips

"AJM1949" wrote in message
...
I would like to auto save an excel workbook using a cell value as the file
name and save it in a specific folder ie My Documents\Quotes. I have been
unable to find an answer to this in previous responses. Any help would be
very much appreciated.

Thanks in advance
--
AJM1949




  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.SaveAs Filename:= "C:\My Doc umtnets\Quotes\" & _
Worksheets("Sheet1").Range("A1").Value
End Sub

--
HTH

Bob Phillips

"AJM1949" wrote in message
...
Hello Bob
Many thanks for the code. How can I specify the path to save the workbook
to-in this instance I want it to be My Documents\Quotes.
--
AJM1949


"Bob Phillips" wrote:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.SaveAs Filename:=Worksheets("Sheet1").Range("A1").Value
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
HTH

Bob Phillips

"AJM1949" wrote in message
...
I would like to auto save an excel workbook using a cell value as the

file
name and save it in a specific folder ie My Documents\Quotes. I have

been
unable to find an answer to this in previous responses. Any help would

be
very much appreciated.

Thanks in advance
--
AJM1949






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
how to disable save prompt on closing excel file in automated mode [email protected] Excel Discussion (Misc queries) 3 July 6th 05 10:35 PM
Restore the auto save function, it was a life saver. JJB Excel Discussion (Misc queries) 1 May 20th 05 01:25 PM
Auto save with a numerical number Sean Leonard Excel Discussion (Misc queries) 1 May 7th 05 05:04 AM
Save? prompt when closing Excel MC Excel Discussion (Misc queries) 4 March 12th 05 10:55 PM
Excel 2000 Auto Save YLWALSH Excel Worksheet Functions 2 March 5th 05 07:19 PM


All times are GMT +1. The time now is 11:33 PM.

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"