ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to make excel close (https://www.excelbanter.com/excel-programming/343371-macro-make-excel-close.html)

grandfilth

Macro to make excel close
 

I'm making a program in excel, and have been trying to create a macr
that makes excel close, without the "do you want to save" pop-up comin
up, alas i have failed, does anyone have any ideas?i've trie
activewindow.close..

--
grandfilt
-----------------------------------------------------------------------
grandfilth's Profile: http://www.excelforum.com/member.php...fo&userid=2824
View this thread: http://www.excelforum.com/showthread.php?threadid=47792


Zack Barresse

Macro to make excel close
 
Excel close? Or just the open file?

... will close the active workbook ..

sub closebooknow()
if activeworkbook is nothing then exit sub
activeworkbook.close false
end sub

... will close excel ..

sub closeappnow()
application.displayalerts = false
application.quit
end sub

HTH

--
Regards,
Zack Barresse, aka firefytr, (GT = TFS FF Zack)



"grandfilth" wrote
in message ...

I'm making a program in excel, and have been trying to create a macro
that makes excel close, without the "do you want to save" pop-up coming
up, alas i have failed, does anyone have any ideas?i've tried
activewindow.close...


--
grandfilth
------------------------------------------------------------------------
grandfilth's Profile:
http://www.excelforum.com/member.php...o&userid=28240
View this thread: http://www.excelforum.com/showthread...hreadid=477928




Jim Thomlinson[_4_]

Macro to make excel close
 
You can use
Activeworkbook.Saved = True
to tell excel that the current file is already saved and no further action
is required.

Application.quit
will close down Excel
--
HTH...

Jim Thomlinson


"grandfilth" wrote:


I'm making a program in excel, and have been trying to create a macro
that makes excel close, without the "do you want to save" pop-up coming
up, alas i have failed, does anyone have any ideas?i've tried
activewindow.close...


--
grandfilth
------------------------------------------------------------------------
grandfilth's Profile: http://www.excelforum.com/member.php...o&userid=28240
View this thread: http://www.excelforum.com/showthread...hreadid=477928



Ron de Bruin

Macro to make excel close
 
Hi grandfilth

You can have more then one workbook open in Excel.
What you do then ?

Try this

ActiveWorkbook.Close False ' or true if you want to save
Application.Quit




--
Regards Ron de Bruin
http://www.rondebruin.nl


"grandfilth" wrote in message
...

I'm making a program in excel, and have been trying to create a macro
that makes excel close, without the "do you want to save" pop-up coming
up, alas i have failed, does anyone have any ideas?i've tried
activewindow.close...


--
grandfilth
------------------------------------------------------------------------
grandfilth's Profile: http://www.excelforum.com/member.php...o&userid=28240
View this thread: http://www.excelforum.com/showthread...hreadid=477928




Tom Ogilvy

Macro to make excel close
 
Application.DisplayAlerts = False
Application.Quit

--
Regards,
Tom Ogilvy

"grandfilth" wrote
in message ...

I'm making a program in excel, and have been trying to create a macro
that makes excel close, without the "do you want to save" pop-up coming
up, alas i have failed, does anyone have any ideas?i've tried
activewindow.close...


--
grandfilth
------------------------------------------------------------------------
grandfilth's Profile:

http://www.excelforum.com/member.php...o&userid=28240
View this thread: http://www.excelforum.com/showthread...hreadid=477928




FSt1

Macro to make excel close
 
hi,
ActiveWindow.save
ActiveWindow.close

this will prevent the save as box from popping up.

FSt1

"grandfilth" wrote:


I'm making a program in excel, and have been trying to create a macro
that makes excel close, without the "do you want to save" pop-up coming
up, alas i have failed, does anyone have any ideas?i've tried
activewindow.close...


--
grandfilth
------------------------------------------------------------------------
grandfilth's Profile: http://www.excelforum.com/member.php...o&userid=28240
View this thread: http://www.excelforum.com/showthread...hreadid=477928




All times are GMT +1. The time now is 07:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com