Results 1 to 5 of 5

Copy and paste from one worksheet to another worksheet macro problem

Threaded View

  1. #1
    Registered User
    Join Date
    07-14-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Copy and paste from one worksheet to another worksheet macro problem

    Hi!

    New to VBA, Excel 2010, Calculation option set to manual (Sorry if I missed any info needed)

    I have made a macro that with a click of a button gets some values of a formula from one worksheet and pastes them in another worksheet and my problem is that when I press the button again it just overwrites values from the first row instead of pasting them on a new row.

    Sub button2_click()
    
    Worksheets("NumGen").Range("A2:B1001").Calculate
    With Worksheets("Draw")
        Range("C6").Calculate
        Range("E6").Calculate
        Range("G6").Calculate
        Range("I6").Calculate
        Range("K6").Calculate
    End With
    
        Range("C6").Select
        Selection.Copy
        Sheets("DrawHistory").Select
        Range("A2").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Sheets("Draw").Select
        Range("E6").Select
        Application.CutCopyMode = False
        Selection.Copy
        Sheets("DrawHistory").Select
        Range("B2").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Sheets("Draw").Select
        Range("G6").Select
        Application.CutCopyMode = False
        Selection.Copy
        Sheets("DrawHistory").Select
        Range("C2").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Sheets("Draw").Select
        Range("I6").Select
        Application.CutCopyMode = False
        Selection.Copy
        Sheets("DrawHistory").Select
        Range("D2").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Sheets("Draw").Select
        Range("K6").Select
        Application.CutCopyMode = False
        Selection.Copy
        Sheets("DrawHistory").Select
        Range("E2").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Range("F2").Select
        Application.CutCopyMode = False
        ActiveCell.FormulaR1C1 = "=NOW()"
        Range("A3").Select
        Sheets("Draw").Select
        Range("A1").Select
        
    
    End Sub
    Thanks in advance for any help

    Regards, Zebastian Luthin
    Last edited by Kerbazee; 07-14-2013 at 09:21 PM. Reason: As per Forum Rule #3, please use code tags…Thanks.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro to copy data from one worksheet and paste to another worksheet
    By robertmiller in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-01-2013, 09:56 AM
  2. [SOLVED] Copy data from a worksheet and paste to worksheet with a similar worksheet name
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-21-2012, 04:02 AM
  3. Copy data from a worksheet and paste to worksheet with a similar worksheet name
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-21-2012, 02:49 AM
  4. Excel VBA problem with copy and paste from different worksheet
    By banidnigo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-14-2012, 10:22 PM
  5. [SOLVED] Copy/Paste Active Cell to new worksheet problem
    By ipmaham in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 08-13-2012, 10:43 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