printing problem

  • Thread starter Thread starter Robert Couchman
  • Start date Start date
R

Robert Couchman

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
([email protected])
 
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
'-------------------------------
 
Back
Top