+ Reply to Thread
Results 1 to 3 of 3

paste special does not work

  1. #1
    Panagiotis Marantos
    Guest

    paste special does not work

    why the paste special brings an error message : runtime error 1004:
    Pastespecial method of range class failed

    Private Sub CommandButton3_Click()
    Dim recordnumber As String
    Dim a, b, c As String
    Dim recordno As Integer
    recordno = countrecords + 1
    a = "A" & recordno
    b = "HO" & recordno
    c = a & ":" & b
    For Each cell In Worksheets("Intro Page").Range("K63:K103")
    If cell.Value = "" Then
    cell.Value = Worksheets("Temporary Record").Range("B1")
    Exit For
    End If
    Next cell

    Worksheets("Temporary Record").Activate
    Worksheets("Temporary Record").Range("B1:B223").Select
    Selection.Cut
    Worksheets("Saved Records").Activate
    Worksheets("Saved Records").Range(c).Select
    Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
    SkipBlanks:=False, Transpose:=True

    End Sub

  2. #2
    Snake Plissken
    Guest

    Re: paste special does not work

    because of that:
    "Selection.Cut "

    try to make cut and paste special during standard "hand" sheet processing...



  3. #3
    Panagiotis Marantos
    Guest

    RE: paste special does not work

    don't worry

    i found the solution...

    no paste special when you cut the cells.

    dohh!!!!

    "Panagiotis Marantos" wrote:

    > why the paste special brings an error message : runtime error 1004:
    > Pastespecial method of range class failed
    >
    > Private Sub CommandButton3_Click()
    > Dim recordnumber As String
    > Dim a, b, c As String
    > Dim recordno As Integer
    > recordno = countrecords + 1
    > a = "A" & recordno
    > b = "HO" & recordno
    > c = a & ":" & b
    > For Each cell In Worksheets("Intro Page").Range("K63:K103")
    > If cell.Value = "" Then
    > cell.Value = Worksheets("Temporary Record").Range("B1")
    > Exit For
    > End If
    > Next cell
    >
    > Worksheets("Temporary Record").Activate
    > Worksheets("Temporary Record").Range("B1:B223").Select
    > Selection.Cut
    > Worksheets("Saved Records").Activate
    > Worksheets("Saved Records").Range(c).Select
    > Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
    > SkipBlanks:=False, Transpose:=True
    >
    > End Sub


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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