ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Print Refedit range? (https://www.excelbanter.com/excel-programming/366436-print-refedit-range.html)

T.c.Goosen1977[_43_]

Print Refedit range?
 

I have a Refedit range box in one of my yserforms and under it a
commandbutton...when i select a range making use of the Refedit box it
works fine but the moment i click the commandbutton it does not print
the selected range..it prints a blank page...i need some advice on the
coding to print the selected range

Thanks
Theuns


--
T.c.Goosen1977
------------------------------------------------------------------------
T.c.Goosen1977's Profile: http://www.excelforum.com/member.php...o&userid=35895
View this thread: http://www.excelforum.com/showthread...hreadid=558880


Leith Ross[_638_]

Print Refedit range?
 

Hello,

Seet the print area to the RefEdit range before printing out the
worksheet.

With Worksheets("Sheet1")
..PageSetup.PrintArea = "$A$1:$C$5"
..PrintOut
..PageSetup.PrintArea = ""
End With

Change Sheet1 to match the name of the Worksheet the range is part of.

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=558880


T.c.Goosen1977[_44_]

Print Refedit range?
 

yes, that is part of my problem: setting the printing range to the
selected refedit range....the refedit is on a userform and it works
fine when i select the range...but when i click the printing
commandbutton i...it prints blank...so how do i assign the refedit
range to the printing command button?


--
T.c.Goosen1977
------------------------------------------------------------------------
T.c.Goosen1977's Profile: http://www.excelforum.com/member.php...o&userid=35895
View this thread: http://www.excelforum.com/showthread...hreadid=558880


T.c.Goosen1977[_45_]

Print Refedit range?
 

Got it right...thanks guys



With Range(RefEdit1)
..PrintOut Copies:=1, Collate:=True
End With


--
T.c.Goosen1977
------------------------------------------------------------------------
T.c.Goosen1977's Profile: http://www.excelforum.com/member.php...o&userid=35895
View this thread: http://www.excelforum.com/showthread...hreadid=558880



All times are GMT +1. The time now is 11:41 PM.

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