+ Reply to Thread
Results 1 to 3 of 3

Paste Values

  1. #1
    Esrei
    Guest

    Paste Values

    I have tried almost every thing but can not get this macro to paste values.
    please help. Where can I read more about methods, and properties.

    Thank you

    Sub Button2_click()
    Dim NewRow As Integer
    NewRow = Worksheets("Form").Range("O1").Value + 1
    If Worksheets("Form").Range("O2").Value <> 0 Then
    MsgBox "There are errors. No data has been added!", vbOKOnly, "MeadInkent"
    Exit Sub
    End If
    Worksheets("form").Range("A10:A40").Copy Worksheets("data").Cells(NewRow, 1)

    End Sub

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525
    Change

    Please Login or Register  to view this content.

  3. #3
    Esrei
    Guest

    Re: Paste Values

    Thanks a lot I tried that but can not understand why it didn't work, the
    error was expected end of statement. But now it works.

    "jindon" wrote:

    >
    > Change
    >
    >
    > Code:
    > --------------------
    >
    > Worksheets("Form").Range("A10:A140").Copy
    > Worksheets("data").Cells(NewRow, 1).PasteSpecial xlPasteValues
    > --------------------
    >
    >
    > --
    > jindon
    > ------------------------------------------------------------------------
    > jindon's Profile: http://www.excelforum.com/member.php...o&userid=13135
    > View this thread: http://www.excelforum.com/showthread...hreadid=551302
    >
    >


+ 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