I have a multipage userform with 10 pages. Can someone help with the
code to print all the pages.I tried me.printform but it only prints
page 1.
Thanks
Allan
I have a multipage userform with 10 pages. Can someone help with the
code to print all the pages.I tried me.printform but it only prints
page 1.
Thanks
Allan
Maybe something like this:
Option Explicit
Private Sub CommandButton1_Click()
Dim curPage As Long
Dim iCtr As Long
curPage = Me.MultiPage1.Value
For iCtr = 0 To Me.MultiPage1.Pages.Count - 1
Me.MultiPage1.Value = iCtr
Me.PrintForm
Next iCtr
Me.MultiPage1.Value = curPage
End Sub
Alro wrote:
>
> I have a multipage userform with 10 pages. Can someone help with the
> code to print all the pages.I tried me.printform but it only prints
> page 1.
>
> Thanks
>
> Allan
--
Dave Peterson
How about:
Private Sub CommandButton1_Click()
For i = 0 To 9
Me.MultiPage1.Value = i
Me.PrintForm
Next
End Sub
Bob Umlas
Excel MVP
"Alro" <[email protected]> wrote in message
news:[email protected]...
>I have a multipage userform with 10 pages. Can someone help with the
> code to print all the pages.I tried me.printform but it only prints
> page 1.
>
> Thanks
>
> Allan
>
Bob Umlas wrote:
> How about:
> Private Sub CommandButton1_Click()
> For i = 0 To 9
> Me.MultiPage1.Value = i
> Me.PrintForm
> Next
> End Sub
>
> Bob Umlas
> Excel MVP
>
> "Alro" <[email protected]> wrote in message
> news:[email protected]...
> >I have a multipage userform with 10 pages. Can someone help with the
> > code to print all the pages.I tried me.printform but it only prints
> > page 1.
> >
> > Thanks
> >
> > Allan
Gents
Thank you for your quick response. I am getting a compile error on the
..multipage1 on both your solutions.
Private Sub CommandButton172_Click()
For i = 0 To 9
Me.MultiPage1.Value = i
Me.PrintForm
Next
End Sub
Regards
Allan
> >
Did you rename the control?
if you click on the multipage control (in design mode), then click F4, what do
you see for the (Name) property in the property window.
Use that.
Alro wrote:
>
> Bob Umlas wrote:
> > How about:
> > Private Sub CommandButton1_Click()
> > For i = 0 To 9
> > Me.MultiPage1.Value = i
> > Me.PrintForm
> > Next
> > End Sub
> >
> > Bob Umlas
> > Excel MVP
> >
> > "Alro" <[email protected]> wrote in message
> > news:[email protected]...
> > >I have a multipage userform with 10 pages. Can someone help with the
> > > code to print all the pages.I tried me.printform but it only prints
> > > page 1.
> > >
> > > Thanks
> > >
> > > Allan
>
> Gents
>
> Thank you for your quick response. I am getting a compile error on the
> .multipage1 on both your solutions.
>
> Private Sub CommandButton172_Click()
>
> For i = 0 To 9
> Me.MultiPage1.Value = i
> Me.PrintForm
> Next
>
> End Sub
>
> Regards
>
> Allan
>
> > >
--
Dave Peterson
Dave Peterson wrote:
> Did you rename the control?
>
> if you click on the multipage control (in design mode), then click F4, what do
> you see for the (Name) property in the property window.
>
> Use that.
>
> Alro wrote:
> >
> > Bob Umlas wrote:
> > > How about:
> > > Private Sub CommandButton1_Click()
> > > For i = 0 To 9
> > > Me.MultiPage1.Value = i
> > > Me.PrintForm
> > > Next
> > > End Sub
> > >
> > > Bob Umlas
> > > Excel MVP
> > >
> > > "Alro" <[email protected]> wrote in message
> > > news:[email protected]...
> > > >I have a multipage userform with 10 pages. Can someone help with the
> > > > code to print all the pages.I tried me.printform but it only prints
> > > > page 1.
> > > >
> > > > Thanks
> > > >
> > > > Allan
> >
> > Gents
> >
> > Thank you for your quick response. I am getting a compile error on the
> > .multipage1 on both your solutions.
> >
> > Private Sub CommandButton172_Click()
> >
> > For i = 0 To 9
> > Me.MultiPage1.Value = i
> > Me.PrintForm
> > Next
> >
> > End Sub
> >
> > Regards
> >
> > Allan
> >
> > > >
>
> --
>
> Dave Peterson
Dave,
Yes that has worked. Thanks for your help
Allan
hi,
the macro didnt fit the entire page if i send it to pdf printer. Is it possible to enlarge the code to have landscape form and give the pdf print a name.
thanks jacky
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks