Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing the clipboard to clear it

Status
Not open for further replies.

nickjar2

Programmer
Jun 20, 2001
778
US
HI,

Hopefully somebody can help. I have done this in VB but cannot seem to work out how to do it using VBA in Excel. Here is some of the code I am using:

xlexcel.Range("AW10:AZ" & n).Select
xlApp.Selection.Copy
Sheets("xions evidence").Select
Application.Goto reference:="R2C49"
ActiveSheet.Paste

pNumRecs = n - 10
Sheets("xions evidence").Cells(1, 11) = pNumRecs

ok:
xlBook.Close
Set xlBook = Nothing
xlApp.Quit

So when I am closing Excel, there is a lot of data still on the clipboard, and a msgbox pops up informing me of this. Can I either clear the clipboard first, ot turn the warnings off.

Cheers,

Nick
 
I have found I can do it by:
xlApp.displayAlerts=false.

Still interested to know whether the clipboard can be cleared though.

Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top