View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Need some more eyes to look at this ...

You can also try it with PasteSpecial Values and see if you have the same problem

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Ron de Bruin" wrote in message ...
I not understand the code that you use now

You loop through the files and copy the columns(27) to the same place each time ?
Is that correct ?

Tell me what you want then I can make another example for you that you can try

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Ray" wrote in message oups.com...
On May 7, 11:10 am, "Ron de Bruin" wrote:
Hi Ray

Maybe there is a problem with the file ?

Try one of the code samples on this pagehttp://www.rondebruin.nl/copy3.htm

Or try the add-in (link on the page above)

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm

"Ray" wrote in oglegroups.com...
I'm not sure how to 'bump' my previous thread to the first page again
(so more people will see it), so please take a look at this post:
http://groups.google.com/group/micro...rogramming/bro...

thanks, ray


Hi Ron, thanks for your response ...

I just ran a 'test' of sorts and I think I've narrowed the problem
down, but still don't know how to fix it ...

The test was this: I took out all of the source files that have
worked properly before, leaving approx 20 files (incl the file that
the code had continually stopped on). This time, the 'problem' file
worked ok, but the code STILL errored out on the same line
(destrange.Value = sourceRange.Value) on the 16th file.

So, it would seem that I'm defininely over-running some type of
buffer, perhaps the clipboard?

I've tried this code:
Application.CutCopyMode = False
at the end of each loop, to clear the clipboard .... as well as this
code:

Public Declare Function OpenClipboard Lib "user32" ( _
ByVal hwnd AsLong) As Long
Public Declare Function CloseClipboard Lib "user32" () As Long
Public Declare Function EmptyClipboard Lib "user32" () As Long

Sub ClearClipboard()
OpenClipboard (0&)
EmptyClipboard
CloseClipboard
End Sub
(via Frank Kabel)

No luck on either one ...

any more thoughts?