Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
AOU AOU is offline
external usenet poster
 
Posts: 54
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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   Report Post  
Posted to microsoft.public.excel.programming
AOU AOU is offline
external usenet poster
 
Posts: 54
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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
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




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





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






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
Single column not printing Ernie Excel Discussion (Misc queries) 0 April 22nd 10 02:56 PM
Printing single pages from multiple worksheets in a single print job [email protected] Excel Discussion (Misc queries) 2 April 27th 07 06:11 PM
Printing Single Page Paul Smith[_3_] Excel Programming 1 September 1st 05 05:31 PM
Not printing a single cell's value. Jason Excel Worksheet Functions 1 March 15th 05 04:18 PM
printing a single row of info. Gary Excel Discussion (Misc queries) 4 March 1st 05 10:25 PM


All times are GMT +1. The time now is 02:03 AM.

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

About Us

"It's about Microsoft Excel"