xlClipboard Clear Contents
John-
I am still having the same problem with the clipboard. I
do not know if it could be related to the fact that the
code is using two spreadsheets. Below is the code which is
located in file w2
Set X = ActiveSheet.Range("A2")
Do While Not IsEmpty(X)
Set Y = X.Offset(1, 0)
Set Z = X.Offset(0, 8)
Range(X, Z).Copy
Workbooks.Open Filename:= _
"F:w1.xls"
Windows("w1.xls").Activate
ActiveWorkbook.Sheets("Links").Select
Range("B1").Select
Selection.PasteSpecial Paste:=xlValues,
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.Run "'w1.xls'!Macro3"
ActiveWorkbook.Sheets("Principal").Select
Range("F6").Select
ActiveCell.End(xlDown).Select
Selection.Name = "BBB123"
Range("F6", "BBB123").Copy
Windows("w2.xls").Activate
ActiveWorkbook.Sheets("PBal").Select
Range("E1").Activate
ActiveCell.End(xlDown).Activate
Set Q = ActiveCell
Q.Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlValues,
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Workbooks("w1.xls").Close SaveChanges:=False
Set X = Y
Loop
Application.Run "'w2.xls'!PlaceStars"
End Sub
-----Original Message-----
Tom,
That code should be placed directly after the paste
operation.
Actually, better to place it after each paste operation.
If it's not working, post the section of your code where
you're getting
the alert.
While the pop-up help shows you xlCut and xlCopy, using
False should
clear the clipboard.
John
Tom wrote:
John,
When I put in Application.CutCopyMode I get two options
after the CutCopyMode which are xlcut or xlcopy. I ran
the
program with Apllication.CutCopyMode = False and the
dialog box still came up saying the clipboard if full,
do
I want to save or not. Any more Suggestions?
Thanks,
Tom
-----Original Message-----
Tom,
Application.CutCopyMode = False
should do the trick
John
Tom wrote:
Hi Guys-
I have a vba program that runs through multiple
iterations. After some point the clipboard becomes
full
and the dialog box comes up asking if I want to save
contents and I have to hit the no button. I have
tried
using xlClipboard.Clear but I get an error that says
I
have an invalid qualifier. Any suggestions on how I
can
control the xlClipboard and set it so that it clears
contents on each loop.
Thanks
.
.
|