Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
JHB JHB is offline
external usenet poster
 
Posts: 30
Default Closing a window after transferring data

I have a file from which I have done a copy/paste for a fair amount
of data. I have a macro to do this, and wish to close the window
totally. However when I use:

ActiveWorkbook.Close

I get a message asking whether I want to save the data on the
clipboard. I have looked in "help" for options to supress this
message, but cannot find them.Can someone give me the answer please.
Question is: How do I set the macro to avoid this message when
closing!!

Thanks in advance

John Baker
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Closing a window after transferring data

hi
usually the best method is to turn off alerts at the begining of the macro
then turn them back on at the end.

Application.DisplayAlerts = False
your code here
ActiveWorkbook.Close
Application.DisplayAlerts = True

regards
FSt1

"JHB" wrote:

I have a file from which I have done a copy/paste for a fair amount
of data. I have a macro to do this, and wish to close the window
totally. However when I use:

ActiveWorkbook.Close

I get a message asking whether I want to save the data on the
clipboard. I have looked in "help" for options to supress this
message, but cannot find them.Can someone give me the answer please.
Question is: How do I set the macro to avoid this message when
closing!!

Thanks in advance

John Baker

  #3   Report Post  
Posted to microsoft.public.excel.misc
JHB JHB is offline
external usenet poster
 
Posts: 30
Default Closing a window after transferring data

On Aug 2, 9:12*pm, FSt1 wrote:
hi
usually the best method is to turn off alerts at the begining of the macro
then turn them back on at the end.

Application.DisplayAlerts = False
your code here
ActiveWorkbook.Close
Application.DisplayAlerts = True

regards
FSt1

"JHB" wrote:
I *have a file from which I have done a copy/paste for a fair amount
of data. I have a macro to do this, and wish to close the window
totally. However when I use:


ActiveWorkbook.Close


I get a message asking whether I want to save the data on the
clipboard. I have looked in "help" for options to supress this
message, but cannot find them.Can someone give me the answer please.
Question is: How do I set the macro to avoid this message when
closing!!


Thanks in advance


John Baker


Thanks..very helpful!
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
transferring data Chad[_5_] Excel Discussion (Misc queries) 5 February 25th 09 08:11 AM
Transferring like data npignetti Excel Discussion (Misc queries) 4 October 21st 08 04:06 AM
Transferring Data MJ Excel Worksheet Functions 1 April 16th 08 06:49 PM
Can I insert a pop up window in Excel to ask a ? b/4 closing? Bernadette Excel Discussion (Misc queries) 2 May 9th 06 04:06 PM
Transferring Data Susan Excel Worksheet Functions 0 January 25th 06 08:57 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"