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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Microsoft Excel

Status
Not open for further replies.

AliR

Technical User
Joined
Jan 31, 2003
Messages
4
Location
GB
The following copies data from one workbook to another

Sub CopyData()
'
' CopyData Macro
' Macro recorded and edited 22/01/2003 by ARennie
'


Workbooks.Open Filename:="O:\Accounts 02\TB Test.xls"
Range("A11:B11").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Range("A10").Select
Windows("Annual Accounts Matrix.xls").Activate
Sheets("ImportedTB").Select
Range("A1").Select
ActiveSheet.Paste
Range("A1").Select
Windows("TB Test.xls").Activate
ActiveWorkbook.Close


End Sub

At the ActiveWorkbook.Close line, I get a warning that the clipboard is full and do I wish to clear it or retain the data. I want to by pass this message and not retain the data. How do I do this?
 
Insert
Code:
 Application.CutCopyMode = False
after the
Code:
ActiveSheet.Paste
line Clive [infinity]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top