Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default vba pastespecial


HI,

i am tring to copy data form one spreadsheet to another within the sam
workbook. i need to use the paste special, adding the values. I wrot
the folowwing code and it goes trough ok. it copies the information bu
it does not paste. and it does not show any problem.

anyone could help?

Thanks

Worksheets("dados").Cells(c, E).Select
Selection.Copy
x = c + 1
z = f + 2
Worksheets("Plan").Select
Cells(x, z).PasteSpecial Operation:=xlPasteSpecialOperationAd

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default vba pastespecial

c = 10
e = 5
f = 7
Worksheets("dados").Cells(c,e).Copy
Worksheets("Plan").Cells(c+1,f+2).PasteSpecial paste:=xlValues, _
Operation:=xlPasteSpecialOperationAdd

--
Regards,
Tom Ogilvy


"joao" wrote in message
...

HI,

i am tring to copy data form one spreadsheet to another within the same
workbook. i need to use the paste special, adding the values. I wrote
the folowwing code and it goes trough ok. it copies the information but
it does not paste. and it does not show any problem.

anyone could help?

Thanks

Worksheets("dados").Cells(c, E).Select
Selection.Copy
x = c + 1
z = f + 2
Worksheets("Plan").Select
Cells(x, z).PasteSpecial Operation:=xlPasteSpecialOperationAdd


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default vba pastespecial

hi
the pastespecial is not good in your exemple..
To have the value paste special, use PasteSpecial Paste:=xlValue
It should work..
But you can have found this just by record a value paste special on your sheet

Reply
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 & PasteSpecial Arthur[_3_] Excel Programming 1 November 3rd 03 06:41 PM
A More Effective Way of Using PasteSpecial? CalumMurdo Kennedy Excel Programming 7 October 30th 03 02:49 AM
PasteSpecial:VBA vs right click Rob Bovey Excel Programming 1 August 14th 03 12:26 AM
PasteSpecial failed CR[_2_] Excel Programming 1 August 1st 03 10:57 PM
pastespecial billQ Excel Programming 2 July 29th 03 11:39 PM


All times are GMT +1. The time now is 04:05 AM.

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

About Us

"It's about Microsoft Excel"