Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a form thta data is entered daily. Is there a way that I can print the
form out. Then as data is entered, I insert the printed form in the printer and only print the new data on the form. -- AOU |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am not sure that falls under Excel Programming.
"AOU" wrote: I have a form thta data is entered daily. Is there a way that I can print the form out. Then as data is entered, I insert the printed form in the printer and only print the new data on the form. -- AOU |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It is possible with code but why not print only the last page of the sheet
with code Sub Test() Dim TotPages As Long TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)") With ActiveSheet ActiveSheet.PrintOut From:=TotPages, To:=TotPages End With End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "AOU" wrote in message ... I have a form thta data is entered daily. Is there a way that I can print the form out. Then as data is entered, I insert the printed form in the printer and only print the new data on the form. -- AOU |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Remove one ActiveSheet
Sub Test() Dim TotPages As Long TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)") With ActiveSheet .PrintOut From:=TotPages, To:=TotPages End With End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Ron de Bruin" wrote in message ... It is possible with code but why not print only the last page of the sheet with code Sub Test() Dim TotPages As Long TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)") With ActiveSheet ActiveSheet.PrintOut From:=TotPages, To:=TotPages End With End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "AOU" wrote in message ... I have a form thta data is entered daily. Is there a way that I can print the form out. Then as data is entered, I insert the printed form in the printer and only print the new data on the form. -- AOU |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I was after the ability to select the last row with data and print that rows
data only. -- AOU "Ron de Bruin" wrote: Remove one ActiveSheet Sub Test() Dim TotPages As Long TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)") With ActiveSheet .PrintOut From:=TotPages, To:=TotPages End With End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Ron de Bruin" wrote in message ... It is possible with code but why not print only the last page of the sheet with code Sub Test() Dim TotPages As Long TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)") With ActiveSheet ActiveSheet.PrintOut From:=TotPages, To:=TotPages End With End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "AOU" wrote in message ... I have a form thta data is entered daily. Is there a way that I can print the form out. Then as data is entered, I insert the printed form in the printer and only print the new data on the form. -- AOU |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
For the last row try this
Sub test() Range("A" & LastRow(ActiveSheet)).EntireRow.PrintOut End Sub Function LastRow(sh As Worksheet) On Error Resume Next LastRow = sh.Cells.Find(What:="*", _ After:=sh.Range("A1"), _ Lookat:=xlPart, _ LookIn:=xlFormulas, _ SearchOrder:=xlByRows, _ SearchDirection:=xlPrevious, _ MatchCase:=False).Row On Error GoTo 0 End Function -- Regards Ron de Bruin http://www.rondebruin.nl "AOU" wrote in message ... I was after the ability to select the last row with data and print that rows data only. -- AOU "Ron de Bruin" wrote: Remove one ActiveSheet Sub Test() Dim TotPages As Long TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)") With ActiveSheet .PrintOut From:=TotPages, To:=TotPages End With End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Ron de Bruin" wrote in message ... It is possible with code but why not print only the last page of the sheet with code Sub Test() Dim TotPages As Long TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)") With ActiveSheet ActiveSheet.PrintOut From:=TotPages, To:=TotPages End With End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "AOU" wrote in message ... I have a form thta data is entered daily. Is there a way that I can the form out. Then as data is entered, I insert the printed form in the printer and only print the new data on the form. -- AOU |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks very much Ron I shall try it and let you know how I get on with it.
-- AOU "Ron de Bruin" wrote: For the last row try this Sub test() Range("A" & LastRow(ActiveSheet)).EntireRow.PrintOut End Sub Function LastRow(sh As Worksheet) On Error Resume Next LastRow = sh.Cells.Find(What:="*", _ After:=sh.Range("A1"), _ Lookat:=xlPart, _ LookIn:=xlFormulas, _ SearchOrder:=xlByRows, _ SearchDirection:=xlPrevious, _ MatchCase:=False).Row On Error GoTo 0 End Function -- Regards Ron de Bruin http://www.rondebruin.nl "AOU" wrote in message ... I was after the ability to select the last row with data and print that rows data only. -- AOU "Ron de Bruin" wrote: Remove one ActiveSheet Sub Test() Dim TotPages As Long TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)") With ActiveSheet .PrintOut From:=TotPages, To:=TotPages End With End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Ron de Bruin" wrote in message ... It is possible with code but why not print only the last page of the sheet with code Sub Test() Dim TotPages As Long TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)") With ActiveSheet ActiveSheet.PrintOut From:=TotPages, To:=TotPages End With End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "AOU" wrote in message ... I have a form thta data is entered daily. Is there a way that I can the form out. Then as data is entered, I insert the printed form in the printer and only print the new data on the form. -- AOU |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Single column not printing | Excel Discussion (Misc queries) | |||
Printing single pages from multiple worksheets in a single print job | Excel Discussion (Misc queries) | |||
Printing Single Page | Excel Programming | |||
Not printing a single cell's value. | Excel Worksheet Functions | |||
printing a single row of info. | Excel Discussion (Misc queries) |