Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How can I get an excel macro to close without saving !

I have worksheets email to me. I want to have a simple macro to close them
without saving them, to keep the integrity of what was emailed to me. Is
there a way of doing this ??

thanks ... Roger


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How can I get an excel macro to close without saving !

Try
Application.Quit

Regards
Nigel

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How can I get an excel macro to close without saving !

Great, many thanks guys

Roger

"Nigel" wrote in message
oups.com...
Try
Application.Quit

Regards
Nigel



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default How can I get an excel macro to close without saving !


"Roger O" schrieb im Newsbeitrag
...
I have worksheets email to me. I want to have a simple macro to close them
without saving them, to keep the integrity of what was emailed to me. Is
there a way of doing this ??

thanks ... Roger


Hi Roger,

try

application.DisplayAlerts= False
Workbooks("whatever").Close
application.DisplayAlerts= true

cheers,
Stephan


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default How can I get an excel macro to close without saving !


"Dr. Stephan Kassanke" schrieb im Newsbeitrag
...

"Roger O" schrieb im Newsbeitrag
...
I have worksheets email to me. I want to have a simple macro to close them
without saving them, to keep the integrity of what was emailed to me. Is
there a way of doing this ??

thanks ... Roger


Hi Roger,

try

application.DisplayAlerts= False
Workbooks("whatever").Close
application.DisplayAlerts= true

cheers,
Stephan


or more elegant

Workbooks("whatever").Close SaveChanges:=False

cheers,
Stephan




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
Macro to Prompt User to Close After Saving Rutabaga Excel Discussion (Misc queries) 2 July 12th 07 12:38 AM
Am i the first person to close and excel file, without saving chan Cjbrad Excel Discussion (Misc queries) 3 March 2nd 06 07:58 PM
close excel without saving Mike Excel Programming 11 June 24th 05 04:08 PM
Open/Close Event and Excel Saving process Hari[_3_] Excel Programming 2 September 10th 04 03:16 PM
Auto close excel without saving John Haywood Excel Programming 0 August 23rd 04 09:00 PM


All times are GMT +1. The time now is 04:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"