#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default print row

anyone?


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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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/



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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/


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Print and Print Preview Graphic Moving Resizing 2007/2003 Adam Rayburn Excel Discussion (Misc queries) 0 April 4th 07 04:18 PM
How to format the extension less file to print with Dos's Print Command Badshah Excel Discussion (Misc queries) 0 November 28th 06 12:44 PM
cell borders that I create dont show on print preview or print scott3435 Excel Discussion (Misc queries) 2 April 6th 06 02:37 AM
Pivot Table macro to set print area and print details of drill down data Steve Haskins Excel Discussion (Misc queries) 2 December 28th 05 04:59 PM
Active cell counting in particular print page (one sheet having different print area) ananthmca2004 Excel Worksheet Functions 1 November 24th 05 11:29 AM


All times are GMT +1. The time now is 09:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"