longytravel
Board Regular
- Joined
- Aug 2, 2011
- Messages
- 68
I have the following code
I would really like it to paste into 'B2' on the 'reports' tab
I have changed the 'A1' bit to 'B2' but without success!
Any ideas would be great!
Cheers!
I would really like it to paste into 'B2' on the 'reports' tab
I have changed the 'A1' bit to 'B2' but without success!
Any ideas would be great!
Cheers!
Code:
Private Sub CommandButton1_Click()
Date1 = Me.Date10.Text
Date2 = Me.Date20.Text
With Sheets("data")
lr = .Cells(Rows.Count, "B").End(xlUp).Row
With .Range("B1")
End With
.Range("B1:B" & lr).EntireRow.Copy Sheets("reports").Range("A1")
End With
End Sub
Private Sub Date10_AfterUpdate()
If Not IsDate(Me.Date10.Value) Then
Me.Date10.Text = ""
MsgBox "please type a valid date!"
Exit Sub
End If
End Sub
Private Sub Date20_AfterUpdate()
If Not IsDate(Me.Date20.Value) Then
Me.Date20.Text = ""
MsgBox "please type a valid date!"
Exit Sub
End If
End Sub