Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default 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


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
Close Excel with a Macro JHB Excel Discussion (Misc queries) 2 August 7th 09 12:58 PM
Excel macro to close powerpoint sarahl Excel Discussion (Misc queries) 1 December 2nd 05 12:06 AM
Macro to close excel okanem Excel Discussion (Misc queries) 1 July 19th 05 10:01 AM
macro to close excel Pam C Excel Discussion (Misc queries) 1 May 5th 05 04:43 PM
Close Excel if macro stopped Al[_17_] Excel Programming 8 February 22nd 05 02:54 PM


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