Excelnoobisme
Board Regular
- Joined
- Nov 19, 2010
- Messages
- 128
Hi, currently im using the code as below and working well. This will copy and paste from "working" to "data" on a daily basis. I wish to to protect the user from copy and pasting twice in a day. What code i need to add in? Column A is Date.
Sub CopyandMove()
Dim i As Long
With Sheets("working")
i = .Range("A" & Rows.Count).End(xlUp).Row
.Range("A1:J" & i).Copy
End With
With Sheets("data")
If IsEmpty(.Range("A1")) Then
.Range("A1").PasteSpecial Paste:=xlValues
Else
.Range("A" & Rows.Count).End(xlUp).Offset(1,0).PasteSpecial Paste:=xlValues
End If
End With
End Sub
Sub CopyandMove()
Dim i As Long
With Sheets("working")
i = .Range("A" & Rows.Count).End(xlUp).Row
.Range("A1:J" & i).Copy
End With
With Sheets("data")
If IsEmpty(.Range("A1")) Then
.Range("A1").PasteSpecial Paste:=xlValues
Else
.Range("A" & Rows.Count).End(xlUp).Offset(1,0).PasteSpecial Paste:=xlValues
End If
End With
End Sub