Changing page height while in a multipage

  • Follow


Hello guys,
I have a UserForm with a Multipage, this multipage has 10 pages.
I would like to cnahge the Height of only one page (Page3) from 400 to 200 
while I am visiting this page and revert to 400 when I visit any of the other 
pages. 
You see, the other pages have lots of txt boxes and lbls, but Page3 has only 
a handful of txt and lbls and I would like to shrink its height. 

I can do this by clicking on a command button, but would like to have it 
happen automatically for the user. 

Thank you 

0
Reply Utf 2/25/2010 10:53:02 PM

' in the user form module

Private Sub MultiPage1_Change()
    With MultiPage1
        If .Value = 2 Then
            .Height = 200
        Else
            .Height = 400
        End If
    End With
End Sub

Note the index of the first page is 0, assuming Page3 is the 3rd page its 
index is 2

Regards,
Peter T


"Memphis" <Memphis@discussions.microsoft.com> wrote in message 
news:85BFDA37-64B4-43A2-9697-D52E3DA52944@microsoft.com...
> Hello guys,
> I have a UserForm with a Multipage, this multipage has 10 pages.
> I would like to cnahge the Height of only one page (Page3) from 400 to 200
> while I am visiting this page and revert to 400 when I visit any of the 
> other
> pages.
> You see, the other pages have lots of txt boxes and lbls, but Page3 has 
> only
> a handful of txt and lbls and I would like to shrink its height.
>
> I can do this by clicking on a command button, but would like to have it
> happen automatically for the user.
>
> Thank you
> 


0
Reply Peter 2/25/2010 11:14:28 PM


It worked like a charm, thank you Peter ;-)

Memphis.
______________

"Peter T" wrote:

> ' in the user form module
> 
> Private Sub MultiPage1_Change()
>     With MultiPage1
>         If .Value = 2 Then
>             .Height = 200
>         Else
>             .Height = 400
>         End If
>     End With
> End Sub
> 
> Note the index of the first page is 0, assuming Page3 is the 3rd page its 
> index is 2
> 
> Regards,
> Peter T
> 
> 

0
Reply Utf 2/26/2010 9:13:01 PM

2 Replies
227 Views

(page loaded in 0.073 seconds)

Similiar Articles:
















7/24/2012 9:08:56 AM


Reply: