Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
printing single row only
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
|
|||
|
|||
printing single row only
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
|
|||
|
|||
printing single row only
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
|
|||
|
|||
printing single row only
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
|
|||
|
|||
printing single row only
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
|
|||
|
|||
printing single row only
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
|
|||
|
|||
printing single row only
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 |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
printing single row only
The function find the last row with data on the sheet
Maybe there is a space in a cell in the yellow bar row ? Which row it print now ? -- Regards Ron de Bruin http://www.rondebruin.nl "AOU" wrote in message ... Ron, Thank you for your troubles but I am having problems, it is printing only a yellow bar across the page. The range in which the data is kept is from row 19 to 42 and columns A to L. And it`s just the text I`m after. -- AOU "AOU" wrote: 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 | |
|
|
Similar Threads | ||||
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) |