ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   printing problem (https://www.excelbanter.com/excel-programming/293287-printing-problem.html)

Robert Couchman[_4_]

printing problem
 
Hello,

The message board doesnt seem very busy today! feels like
friday!

anyway,

i have a problem with my printing command, i am trying to
set the printout so that the "fit to page" option can take
a variable from a textbox on a form.

i have the following:--

.FitToPagesWide = textbox1.value
.FitToPagesTall = textbox2.value

but it doesnt work, it says that it cant understand the
command (yes i am using a with command)

can anyone please help?

the original (and working) way for this code was:--

.FitToPagesWide = 1
.FitToPagesTall = 3

Thank you,

Robert Couchman
)

BrianB

printing problem
 
All sorts of things to go wrong with this one. No lazy programmin
allowed (grin). Assuming suitable data entry (another grin) :-

'----------------------------------
Sub test()
Dim p1 As Integer
Dim p2 As Integer
p1 = UserForm1.TextBox1.Value
p2 = UserForm1.TextBox2.Value
With ActiveSheet.PageSetup
.Zoom = False
.FitToPagesWide = p1
.FitToPagesTall = p2
End With
End Sub
'-------------------------------

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



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

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