+ Reply to Thread
Results 1 to 2 of 2

vba error 1004 pastespecial method of Worksheet class failed

  1. #1
    Registered User
    Join Date
    01-28-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    2

    vba error 1004 pastespecial method of Worksheet class failed

    I have a 4 x 5 range of cells that I want to put different coloured circles in depending on the value...

    so for each cell I create the circle (which doesn't put it in a cell) then cut it and paste it into the cell
    everything works well except when it gets to the paste...

    excel hangs for 30 seconds then gives the above error..

    when I debug and hit continue (f5) it works,,,
    and continues on..
    So I get what I want in 10 minutes...

    here is the pertinent code..
    I cannot see any special place to insert the code so I will paste it here..

    ActiveSheet.Shapes.AddShape(msoShapeOval, 564.75, 424.5, 57.75, 55.5).Select
    With Selection.ShapeRange.Fill
    .Visible = msoTrue
    .ForeColor.RGB = RGB(79, 129, 189)
    .Transparency = 0
    .Solid
    End With
    Selection.ShapeRange.Line.Visible = msoFalse
    With Selection.ShapeRange.TextFrame2
    .VerticalAnchor = msoAnchorMiddle
    .HorizontalAnchor = msoAnchorCenter
    End With
    Selection.ShapeRange.Height = 72
    Selection.ShapeRange.Width = 72


    Application.CutCopyMode = False
    Selection.Cut
    On Error GoTo Tryagain
    Tryagain: Range(Cells(j, i), Cells(j, i)).Select
    ActiveSheet.PasteSpecial

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: vba error 1004 pastespecial method of Worksheet class failed

    Instead of cutting and pasting why not move the circles?

    Or put them in the right place when you create them.

    Which range do you want them in?

    PS Can you add code tags?
    If posting code please use code tags, see here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Run time error '1004': PasteSpecial method of Range class failed
    By BorisGRU in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-31-2014, 07:09 PM
  2. [SOLVED] VBA Run-time error '1004': PasteSpecial method of Range class failed on 2nd run
    By hydz1213 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-05-2013, 11:05 AM
  3. Run-time error '1004' - PasteSpecial method of Range class failed
    By antonf in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 05-10-2010, 04:42 PM
  4. [SOLVED] Run-Time error'1004' PasteSpecial Method of Worksheet class failed
    By gj in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-31-2006, 06:48 AM
  5. runtime error 1004 pastespecial method of range class failed
    By dreamz in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-03-2006, 10:57 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1