Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 270
Default Vba - Save but don't close

I know that :-

ThisWorkbook.Close SaveChanges:=True

will Close the workbook and Save. If I just wanted to Save the workbook in a
macro without closing would it be :-?

ThisWorkbook.SaveChanges:=True

Sandy


  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: Vba - Save but don't close

Hi Sandy,

To save the workbook without closing it, you can use the following
Formula:
VBA 
code:
  1. Formula:
    ActiveWorkbook.Save 

This will save the workbook without closing it. If you want to save changes made to the workbook, you can use:
  1. Formula:
    ActiveWorkbook.SaveChanges 

This will save any changes made to the workbook without closing it.
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Vba - Save but don't close

ThisWorkbook.Save

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Sandy" wrote in message
...
I know that :-

ThisWorkbook.Close SaveChanges:=True

will Close the workbook and Save. If I just wanted to Save the workbook in
a macro without closing would it be :-?

ThisWorkbook.SaveChanges:=True

Sandy



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,942
Default Vba - Save but don't close

hi,
Activeworkbook.save

if you have more that one wb open and want to save them all....
dim wb as workbook
for each wb in application.workbooks
wb.save
next wb

regards
FSt1

"Sandy" wrote:

I know that :-

ThisWorkbook.Close SaveChanges:=True

will Close the workbook and Save. If I just wanted to Save the workbook in a
macro without closing would it be :-?

ThisWorkbook.SaveChanges:=True

Sandy



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 270
Default Vba - Save but don't close

Once again thank you Bob

Sandy

"Bob Phillips" wrote in message
...
ThisWorkbook.Save

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"Sandy" wrote in message
...
I know that :-

ThisWorkbook.Close SaveChanges:=True

will Close the workbook and Save. If I just wanted to Save the workbook
in a macro without closing would it be :-?

ThisWorkbook.SaveChanges:=True

Sandy





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
Save/Close All M Scott Excel Discussion (Misc queries) 1 February 6th 07 02:12 AM
Automate save and close y_not Excel Discussion (Misc queries) 2 March 18th 06 06:55 AM
Close excel do not save Steved Excel Worksheet Functions 2 September 9th 05 02:54 AM
To save and close Steved Excel Worksheet Functions 5 July 27th 05 12:17 AM
Save Changes Prompt at close Johnewally Excel Discussion (Misc queries) 2 March 17th 05 10:15 PM


All times are GMT +1. The time now is 08:44 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"