ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   print row (https://www.excelbanter.com/excel-programming/289988-print-row.html)

jamie85[_3_]

print row
 
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 ne
row is also printed?

Also how would i go about creating code for a print preveiw button?

Thank

--
Message posted from http://www.ExcelForum.com


jamie85[_4_]

print row
 
anyone?


---
Message posted from http://www.ExcelForum.com/


Ron de Bruin

print row
 
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/




Tom Ogilvy

print row
 
If you don't set a print area, the default behavior should be to print all
the data in the worksheet.

Private Sub CommandButton1_Click()
Activesheet.PrintPreview
End Sub

--
Regards,
Tom Ogilvy

"jamie85 " wrote in message
...
anyone?


---
Message posted from http://www.ExcelForum.com/




Gord Dibben

print row
 
Patience Jamie, patience.

Only been 17 minutes since your first posting.

Gord Dibben Excel MVP

On Mon, 2 Feb 2004 11:43:03 -0600, jamie85
wrote:

anyone?


---
Message posted from http://www.ExcelForum.com/




All times are GMT +1. The time now is 01:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com