Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Print all pages in a Multi page userform

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Print all pages in a Multi page userform

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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 301
Default Print all pages in a Multi page userform

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" wrote in message
oups.com...
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Print all pages in a Multi page userform


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" wrote in message
oups.com...
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




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Print all pages in a Multi page userform

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" wrote in message
oups.com...
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


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Print all pages in a Multi page userform


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" wrote in message
oups.com...
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

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
Setting the print area in page set up to print 1 page wide by 2 pages tall EA[_2_] Excel Discussion (Misc queries) 2 July 12th 07 08:39 PM
multi-page print, but only one header miketv Excel Discussion (Misc queries) 0 February 22nd 06 03:22 PM
I want to print multi pages on one page. Laurie Excel Discussion (Misc queries) 2 August 24th 05 11:44 AM
Can I print 2 pages on 1 page? Angel lover Excel Discussion (Misc queries) 2 December 30th 04 07:45 PM
Hide a page in a multi page userform Ian Mangelsdorf Excel Programming 1 October 27th 04 09:06 AM


All times are GMT +1. The time now is 10:23 PM.

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

About Us

"It's about Microsoft Excel"