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
Bookmarks