Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Copy and PasteSpecial help


I have simple code:

Sheets("DW").Range("C15:BK15").Copy
Sheets("DW").Range("C11").PasteSpecial(xlValues)

I get the follwoing error:

Error 1004
Unable to get the PasteSpecial property of the Range class

What gives?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Copy and PasteSpecial help

try

with range("c15:bk15")
..value=.formula
end with
--
Don Guillett
SalesAid Software

"chemicals" wrote in message
...

I have simple code:

Sheets("DW").Range("C15:BK15").Copy
Sheets("DW").Range("C11").PasteSpecial(xlValues)

I get the follwoing error:

Error 1004
Unable to get the PasteSpecial property of the Range class

What gives?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default Copy and PasteSpecial help

Try this one,

Option Explicit
Public Sub PasteSpecial()
Dim ws As String
Dim from As Range
Dim destination As Range
ws = "DW"

With Worksheets(ws)
Set from = .Range("A2:A5")
Set destination = .Range("B2")
Call from.Copy
Call destination.PasteSpecial(xlPasteValues)
End With

End Sub

--
Carlos


"Don Guillett" wrote:

try

with range("c15:bk15")
..value=.formula
end with
--
Don Guillett
SalesAid Software

"chemicals" wrote in message
...

I have simple code:

Sheets("DW").Range("C15:BK15").Copy
Sheets("DW").Range("C11").PasteSpecial(xlValues)

I get the follwoing error:

Error 1004
Unable to get the PasteSpecial property of the Range class

What gives?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default Copy and PasteSpecial help

Try this one.

Option Explicit
Public Sub PasteSpecial()
Dim ws As String
Dim from As Range
Dim destination As Range
ws = "DW"

With Worksheets(ws)
Set from = .Range("A2:A5")
Set destination = .Range("B2")
Call from.Copy
Call destination.PasteSpecial(xlPasteValues)
End With

End Sub


--
Carlos


"chemicals" wrote:


I have simple code:

Sheets("DW").Range("C15:BK15").Copy
Sheets("DW").Range("C11").PasteSpecial(xlValues)

I get the follwoing error:

Error 1004
Unable to get the PasteSpecial property of the Range class

What gives?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Copy and PasteSpecial help

I have solved it with this workaround...but woudlstill like to know what my
original problem was

Sheets("DW").Range("C11:BK11").Value =
Sheets("DW").Range("C15:BK15").Value


"chemicals" wrote:


I have simple code:

Sheets("DW").Range("C15:BK15").Copy
Sheets("DW").Range("C11").PasteSpecial(xlValues)

I get the follwoing error:

Error 1004
Unable to get the PasteSpecial property of the Range class

What gives?



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Copy and PasteSpecial help

I am guessing that that line of code was all on one line? That would cause
the problem. PasteSpecial code goes on 2 lines... something like this...

Sheets("DW").Range("C15:BK15").Copy
Sheets("DW").Range("C11").PasteSpecial xlValues
Application.CutCopyMode = False
--
HTH...

Jim Thomlinson


"chemicals" wrote:


I have simple code:

Sheets("DW").Range("C15:BK15").Copy
Sheets("DW").Range("C11").PasteSpecial(xlValues)

I get the follwoing error:

Error 1004
Unable to get the PasteSpecial property of the Range class

What gives?

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 Chart and PasteSpecial PCLIVE Charts and Charting in Excel 2 October 26th 06 03:01 PM
.Copy Destination:= .PasteSpecial ??? myBasic[_2_] Excel Programming 2 November 12th 04 10:11 AM
Copy PasteSpecial Rob van Gelder[_4_] Excel Programming 1 July 28th 04 07:59 AM
Copy & PasteSpecial Arthur[_3_] Excel Programming 1 November 3rd 03 06:41 PM
Copy and pastespecial without formulas Steven Cheng[_2_] Excel Programming 2 July 26th 03 08:51 PM


All times are GMT +1. The time now is 11:55 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"