Clipboard clear error

  • Thread starter andres.navarret
  • Start date
A

andres.navarret

Hi,

Windows XP
Office 2003

I have been trying to write a macro that just copy a lot of informatio
from one sheet and then paste it into another as value, and the macr
has to do that several times. The problem is that when try to do it fo
the fourth time, Excel gives a message error that indicates th
application ran out of resources or something like that...in othe
words y put too much information in the clipboard y the syste
collapse. So I tried to clear the clipboard every time I paste the inf
and I tried to use the following instruction:

Clipboard.Clear and the Excel gave an "424" error...so VB it wa
missing an object, so I tried the following
My.Computer.Clipboard.Clear() and then Excel gave me an error that i
was expecting a "=".

I have searched in all kind of forums and everybody seems to us
Clipboard.Clear without a prob into thier codes, why I am having al
this trouble?, it is not my computer, because I have tried this a
least in three diffferent computers, so I am doing something wrong. Ca
you help me out, please!!!!!!!!!!!!!!

Regards

Andres Navarret
 
N

NickHK

Not sure which langauge you are using, but may be you should ask a NG for
that langauge.

NickHK
 
A

andres.navarret

I am using the Visual Basic Editor that comes with Excel to write th
macro
 
N

NickHK

Well, you have to VBA to write your code then.
There are no such objects as Clipboard, My or Computer.

NickHK
 
A

andres.navarret

Are you aware of some way to clear the clipboard from VBA code, becaus
I've tried and I am getting nowhere.

Thanks for the feedbac
 
N

NickHK

Andres,
Application.CutCopyMode = False

There is also the DataObject for working with the clipboard.

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top