LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default PasteSpecial Method of Range Class Failed Error

THANKS GUYS! Got it working and prettied it up using Zack's code.

"Zack Barresse" wrote:

Hi Brian,

You can shorten it to a one-liner to transfer values ...

Sheets("Customer Data").Range("B2").Value =
Sheets("Sheet3").Range("A7").Value

HTH

--
Regards,
Zack Barresse, aka firefytr
To email, remove NOSPAM


"Brian C" wrote in message
...
Hi,

I'm running the following code to copy a range (single cell) from "Sheet3"
to a cell in the "Customer Data" sheet. The macro appears to select the
appropriate cell, copies the data, selects the appropriate destination
sheet
and cell, then comes back with a Runtime error 1004 Paste Special method
of
Range Class Failed error.

I unprotected the sheets, selected only a single cell range, and still get
the error.

Here's the code I'm using. The "Calculations" sheet will be used for
other
copy -Past Special steps later in the macro, but can be ignored for now.

Thanks for your help,

Brian

Application.ScreenUpdating = False
destWB.Activate
Sheets("Sheet3").Visible = True
Sheets("Calculations").Visible = True
Sheets("Customer Data").Visible = True
Sheets("Calculations").Unprotect
Sheets("Customer Data").Unprotect


Sheets("Sheet3").Select
Range("A7").Select
Selection.Copy
Application.CutCopyMode = False
Sheets("Customer Data").Select
ActiveSheet.Range("B2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
_
False, Transpose:=False
Application.CutCopyMode = False


***The error occurs while executing the Selection.PastSpecial command***






 
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
runtime error 1004 pastespecial method of range class failed dreamz[_29_] Excel Programming 5 February 3rd 06 02:57 PM
Error 1004: Calculate Method of Range Class Failed Dan Winterton[_2_] Excel Programming 6 October 13th 05 10:19 PM
PasteSpecial method of Range class failed windsor Excel Programming 6 October 6th 05 10:16 PM
Run-time error '1004' PasteSpecial Method of Range Class Failed Kevin G[_2_] Excel Programming 1 February 3rd 04 05:01 AM
VB Error: Paste Special method of range class failed Chris Excel Programming 2 January 30th 04 12:51 PM


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