LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default problem with excel vba copy/paste. can anyone help?

'copy
dataWS.Activate
Set xlrng = dataWS.Range(dataWS.Cells(Row, 5), dataWS.Cells(Row, 256))
xlrng.Select
Application.CutCopyMode = False
Selection.Copy
'paste
xlws.Activate
xlws.Cells(writerow, 1).Select
On Error Resume Next
ActiveSheet.Paste
Selection.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
' if err.Number < 0 then
' msgbox "Selection can not be pasted"
' end if
on Error goto 0

--
Regards,
Tom Ogilvy


"vbadude" wrote:

i get an inconsistent error... more like a fluke.... that happens once in a
blue moon.
The code below results in an incomplete paste. Only the 1st cell is pasted
and the rest are blank?!!!

'copy
dataWS.Activate
Set xlrng = dataWS.Range(dataWS.Cells(Row, 5), dataWS.Cells(Row, 256))
xlrng.Select
Application.CutCopyMode = False
Selection.Copy

'paste
xlws.Activate
xlws.Cells(writerow, 1).Select
ActiveSheet.Paste
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

Ideas anyone?

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy and paste problem Excel 2007 CHEL294 Excel Discussion (Misc queries) 3 June 4th 09 09:40 PM
memory problem of Excel 2003 copy & paste LunaMoon Excel Discussion (Misc queries) 5 August 13th 08 01:51 PM
Excel copy/paste problem mave070252 Excel Discussion (Misc queries) 0 January 2nd 08 01:56 PM
Excel Copy/Paste Problem AndeTech Excel Discussion (Misc queries) 0 May 4th 06 05:55 PM
Excel cut/Paste Problem: Year changes after data is copy and paste Asif Excel Discussion (Misc queries) 2 December 9th 05 05:16 PM


All times are GMT +1. The time now is 11:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"