![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Location: Portsmouth.UK
Posts: 543
|
Does anyone know the code that I can attach to a button to automactically save changes and close workbook, without having the box appear asking me if I want to save changes!
As per usual, thanks in advance ps using Excel 2000 |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Posts: 103
|
Hiya, here it is:
ActiveWorkbook.Saved = True Application.Quit Will |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Location: =ActiveCell.Address
Posts: 478
|
To save: ActiveWorkbook.Close SaveChanges:=1 or ActiveWorkbook.Close True Or to not save: ActiveWorkbook.Close SaveChanges:=0 or ActiveWorkbook.Close False Rgds AJ |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Mar 2002
Location: Portsmouth.UK
Posts: 543
|
Thanks, works like a treat.
On 2002-04-04 07:00, AJ wrote: To save: ActiveWorkbook.Close SaveChanges:=1 or ActiveWorkbook.Close True Or to not save: ActiveWorkbook.Close SaveChanges:=0 or ActiveWorkbook.Close False Rgds AJ [/quote] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|