Try this to print the row with the last value in column A
Sub test()
Dim lr As Long
lr = Range("A" & Rows.Count).End(xlUp).Row
Rows(lr).PrintOut
End Sub
And use this for the PrintPreview
ActiveSheet.PrintPreview
--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl
"jamie85 " wrote in message ...
Private Sub CommandButton1_Click()
Dim LastRow As Object
Range("A2").Select
ActiveSheet.ShowDataForm
End Sub
Is there a way that when i enter a new record using my data form, a new
row is also printed?
Also how would i go about creating code for a print preveiw button?
Thanks
---
Message posted from http://www.ExcelForum.com/