Glasgowsmile
Active Member
- Joined
- Apr 14, 2018
- Messages
- 280
- Office Version
- 365
- Platform
- Windows
Hello!
I've got the following code to copy two columns on the front page and then paste it horizontally (copied vertically) on another page and then assign the date. Just did this through Record Macro.
Works fine with normal buttons but I'd prefer a Command Button -- but it wont work, what's going on here?
Additionally, there is one other issue. I need to copy/paste this data each day but I don't want it to overwrite the previous data, how do I get it to notice data from yesterday and move down to paste the data below it each time?
I've got the following code to copy two columns on the front page and then paste it horizontally (copied vertically) on another page and then assign the date. Just did this through Record Macro.
Works fine with normal buttons but I'd prefer a Command Button -- but it wont work, what's going on here?
Additionally, there is one other issue. I need to copy/paste this data each day but I don't want it to overwrite the previous data, how do I get it to notice data from yesterday and move down to paste the data below it each time?
Code:
Sub Macro8() Range("B2:B14").Select
Selection.Copy
Sheets("LogFile").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("Sheet1").Select
Range("G2:G14").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("LogFile").Select
Range("A2:M2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A3:M14").Select
Range("M3").Activate
Application.CutCopyMode = False
Selection.ClearContents
Range("O7").Select
ActiveCell.FormulaR1C1 = "=TODAY()"
Range("O8").Select
End Sub