Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Paste vs PasteSpecial

I can copy/paste with one line of code:

Sub ccz1()
Cells(1, 1).Copy Cells(2, 2)
End Sub

but when I want to copy/pastespecial I use two:

Sub ccz2()
Cells(1, 1).Copy
Cells(2, 2).PasteSpecial Paste:=xlPasteValues
End Sub

Is there a syntax which performs copy/pastespecial with only one line?
--
Gary's Student
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default Paste vs PasteSpecial

I agree that it is weird, but you are correct. One line for a simple paste
and two lines for a pastespecial.
--
HTH...

Jim Thomlinson


"Gary''s Student" wrote:

I can copy/paste with one line of code:

Sub ccz1()
Cells(1, 1).Copy Cells(2, 2)
End Sub

but when I want to copy/pastespecial I use two:

Sub ccz2()
Cells(1, 1).Copy
Cells(2, 2).PasteSpecial Paste:=xlPasteValues
End Sub

Is there a syntax which performs copy/pastespecial with only one line?
--
Gary's Student

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Paste vs PasteSpecial

Thanks for your time with such a simple question.
--
Gary''s Student


"Jim Thomlinson" wrote:

I agree that it is weird, but you are correct. One line for a simple paste
and two lines for a pastespecial.
--
HTH...

Jim Thomlinson


"Gary''s Student" wrote:

I can copy/paste with one line of code:

Sub ccz1()
Cells(1, 1).Copy Cells(2, 2)
End Sub

but when I want to copy/pastespecial I use two:

Sub ccz2()
Cells(1, 1).Copy
Cells(2, 2).PasteSpecial Paste:=xlPasteValues
End Sub

Is there a syntax which performs copy/pastespecial with only one line?
--
Gary's Student

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Paste vs PasteSpecial

If you're pasting values, maybe you could just assign the value.

cells(2,2).value = cells(1,1).value



Gary''s Student wrote:

I can copy/paste with one line of code:

Sub ccz1()
Cells(1, 1).Copy Cells(2, 2)
End Sub

but when I want to copy/pastespecial I use two:

Sub ccz2()
Cells(1, 1).Copy
Cells(2, 2).PasteSpecial Paste:=xlPasteValues
End Sub

Is there a syntax which performs copy/pastespecial with only one line?
--
Gary's Student


--

Dave Peterson
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
Cut, Copy, Paste, PasteSpecial grayed out. news.microsoft.com[_6_] Excel Discussion (Misc queries) 9 October 19th 17 08:45 PM
PasteSpecial John Austin[_6_] Excel Programming 1 December 14th 05 03:32 PM
paste negative time with PasteSpecial Sylvian Excel Programming 20 September 2nd 05 06:03 AM
PasteSpecial Paste:=ColumnWidths Arvi Laanemets Excel Programming 3 February 8th 05 01:46 PM
pastespecial billQ Excel Programming 2 July 29th 03 11:39 PM


All times are GMT +1. The time now is 09:14 PM.

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"