Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
TOM TOM is offline
external usenet poster
 
Posts: 47
Default Clear data from clipboard using VBA

HI everyone

I am running a loop that gathers information from one workbook to another. I get a message asking if I want to save the inforamtion on the clipboard for further use. I don't want to save this information so how can I stop this from happening

For x = 0 To
m = b -
bb = Format(m, "yyyymmdd"
Sheets.Ad
ActiveSheet.Name = b
Range("A1").Selec
Set mybook = Workbooks.Open("Test - " & bb)

Sheets("Test1").Activat
Columns("b:f").Selec
Selection.Cop

Windows(newbook).Activat

Selection.PasteSpecial Paste:=xlValues, operation:=xlNone, skipblanks:=
False, Transpose:=Fals

mybook.Close Fals

Here is a portion of the loop that is causing the information to be placed on the clipboard. Is it possible to clear it with the pastspecial formula

Thank you for any insight you may have

Tom
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Clear data from clipboard using VBA

Hi
try
...
Application.displayalerts = False
mybook.Close False
Application.displayalerts = True

Note: this does not clear the clipboard, just prevents the message


--
Regards
Frank Kabel
Frankfurt, Germany

tom wrote:
HI everyone,

I am running a loop that gathers information from one workbook to
another. I get a message asking if I want to save the inforamtion on
the clipboard for further use. I don't want to save this information
so how can I stop this from happening?

For x = 0 To 6
m = b - x
bb = Format(m, "yyyymmdd")
Sheets.Add
ActiveSheet.Name = bb
Range("A1").Select
Set mybook = Workbooks.Open("Test - " & bb)

Sheets("Test1").Activate
Columns("b:f").Select
Selection.Copy

Windows(newbook).Activate

Selection.PasteSpecial Paste:=xlValues, operation:=xlNone,
skipblanks:= _
False, Transpose:=False

mybook.Close False

Here is a portion of the loop that is causing the information to be
placed on the clipboard. Is it possible to clear it with the
pastspecial formula?

Thank you for any insight you may have.

Tom

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default Clear data from clipboard using VBA

This is meant to clear the clipboard although I recall some problems with it
in Excel 97.

Application.CutCopyMode = False

Robin Hammond
www.enhanceddatasystems.com

"Frank Kabel" wrote in message
...
Hi
try
..
Application.displayalerts = False
mybook.Close False
Application.displayalerts = True

Note: this does not clear the clipboard, just prevents the message


--
Regards
Frank Kabel
Frankfurt, Germany

tom wrote:
HI everyone,

I am running a loop that gathers information from one workbook to
another. I get a message asking if I want to save the inforamtion on
the clipboard for further use. I don't want to save this information
so how can I stop this from happening?

For x = 0 To 6
m = b - x
bb = Format(m, "yyyymmdd")
Sheets.Add
ActiveSheet.Name = bb
Range("A1").Select
Set mybook = Workbooks.Open("Test - " & bb)

Sheets("Test1").Activate
Columns("b:f").Select
Selection.Copy

Windows(newbook).Activate

Selection.PasteSpecial Paste:=xlValues, operation:=xlNone,
skipblanks:= _
False, Transpose:=False

mybook.Close False

Here is a portion of the loop that is causing the information to be
placed on the clipboard. Is it possible to clear it with the
pastspecial formula?

Thank you for any insight you may have.

Tom



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
Why does it clear my clipboard? Jessica P Excel Discussion (Misc queries) 5 March 19th 08 09:14 PM
Clear Clipboard after Copy Connie Excel Discussion (Misc queries) 2 November 8th 06 07:20 AM
Clear Clipboard in VB Steve Excel Programming 2 February 26th 04 02:30 PM
Clear Clipboard John McGimpsey Excel Programming 0 February 1st 04 10:14 PM
Clear clipboard Deer Hunter Excel Programming 1 August 4th 03 01:47 PM


All times are GMT +1. The time now is 02:13 AM.

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"