Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Bry Bry is offline
external usenet poster
 
Posts: 14
Default macro help - closing without saving & empty clipboard

Hi

i have a number of macro's that open and close different wokbooks to analyse
data. at the moment they run fine but i have to manualy click 'no' on saving
changes and to indicate that the large amount of information on the clipboard
is no longer required. can someone please tell me the code to enter to do
this?

many thanks
Bry
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default macro help - closing without saving & empty clipboard

One I use to close all

Sub CLOSE_ALL()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each w In Workbooks
w.Save
Next w
Application.Quit
End Sub

--
Don Guillett
SalesAid Software

"Bry" wrote in message
...
Hi

i have a number of macro's that open and close different wokbooks to
analyse
data. at the moment they run fine but i have to manualy click 'no' on
saving
changes and to indicate that the large amount of information on the
clipboard
is no longer required. can someone please tell me the code to enter to do
this?

many thanks
Bry



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default macro help - closing without saving & empty clipboard

Application.CutCopyMode = False

Stick this in after any paste step to clear the clipboard.


Gord Dibben MS Excel MVP

On Tue, 14 Nov 2006 08:37:01 -0800, Bry wrote:

Hi

i have a number of macro's that open and close different wokbooks to analyse
data. at the moment they run fine but i have to manualy click 'no' on saving
changes and to indicate that the large amount of information on the clipboard
is no longer required. can someone please tell me the code to enter to do
this?

many thanks
Bry


  #4   Report Post  
Posted to microsoft.public.excel.misc
Bry Bry is offline
external usenet poster
 
Posts: 14
Default macro help - closing without saving & empty clipboard

Thanks Gord, that works fine.

Don, thanks for the advice but sometimes i dont want to close all workbooks
though just the current one, im typicaly using 2 or 3 at a time.

"Gord Dibben" wrote:

Application.CutCopyMode = False

Stick this in after any paste step to clear the clipboard.


Gord Dibben MS Excel MVP

On Tue, 14 Nov 2006 08:37:01 -0800, Bry wrote:

Hi

i have a number of macro's that open and close different wokbooks to analyse
data. at the moment they run fine but i have to manualy click 'no' on saving
changes and to indicate that the large amount of information on the clipboard
is no longer required. can someone please tell me the code to enter to do
this?

many thanks
Bry



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
cannot empty the clipboard Fred Excel Discussion (Misc queries) 0 October 10th 06 08:53 PM
Help with auto macro on closing mr_teacher Excel Discussion (Misc queries) 3 May 17th 06 01:07 PM
Macro Help for Saving a file [email protected] Excel Worksheet Functions 3 May 12th 06 05:16 PM
cannot empty Clipboard Wolf Zscheile Excel Discussion (Misc queries) 0 August 2nd 05 02:41 AM
My copy function won't work - I get error "cannot empty clipboard DenaC Excel Worksheet Functions 0 June 1st 05 03:17 PM


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