ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Multipage Userform Events (https://www.excelbanter.com/excel-programming/327385-multipage-userform-events.html)

SA3214

Multipage Userform Events
 
Once again I crave the assistance of this group

Is there an event which I can use that will be triggered when, say page 3,
of a multipage form is displayed ?

Regards to all
and
TIA



Chip Pearson

Multipage Userform Events
 
Try something like

Private Sub MultiPage1_Change()
If MultiPage1.SelectedItem.Index = 2 Then
MsgBox "third page selected"
End If
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"SA3214 @Eclipse.co.uk" <sa3214<No Spam wrote in message
...
Once again I crave the assistance of this group

Is there an event which I can use that will be triggered when,
say page 3, of a multipage form is displayed ?

Regards to all
and
TIA




SA3214

Multipage Userform Events
 
Many Thanks - works a treat
Once again this group has proved itself invaluable


"Chip Pearson" wrote in message
...
Try something like

Private Sub MultiPage1_Change()
If MultiPage1.SelectedItem.Index = 2 Then
MsgBox "third page selected"
End If
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"SA3214 @Eclipse.co.uk" <sa3214<No Spam wrote in message
...
Once again I crave the assistance of this group

Is there an event which I can use that will be triggered when, say page
3, of a multipage form is displayed ?

Regards to all
and
TIA






Doug Glancy

Multipage Userform Events
 
I've never used a multipage form, but fooling with it I see that the Change
event fires when you switch pages. Interestingly, it doesn't fire when I
click a checkbox or enter text in a textbox. So maybe something like this:

Private Sub MultiPage1_Change()
MsgBox Me.MultiPage1.SelectedItem.Name
End Sub

Finally, as Kramer might say, "You crave, but do you yearn?"

hth,

Doug

"SA3214 @Eclipse.co.uk" <sa3214<No Spam wrote in message
...
Once again I crave the assistance of this group

Is there an event which I can use that will be triggered when, say page 3,
of a multipage form is displayed ?

Regards to all
and
TIA





SA3214

Multipage Userform Events
 
Thanks Doug but as you point out it runs even when changing between pages 1
& 2
To get it to work as I wanted I would have to test the SelectedItem.Name
using an If statement before running the code

The response from Chip is more elegant solution but many thanks for your
suggestion




"Doug Glancy" wrote in message
...
I've never used a multipage form, but fooling with it I see that the
Change
event fires when you switch pages. Interestingly, it doesn't fire when I
click a checkbox or enter text in a textbox. So maybe something like
this:

Private Sub MultiPage1_Change()
MsgBox Me.MultiPage1.SelectedItem.Name
End Sub

Finally, as Kramer might say, "You crave, but do you yearn?"

hth,

Doug

"SA3214 @Eclipse.co.uk" <sa3214<No Spam wrote in message
...
Once again I crave the assistance of this group

Is there an event which I can use that will be triggered when, say page
3,
of a multipage form is displayed ?

Regards to all
and
TIA







Doug Glancy

Multipage Userform Events
 
I've pretty much resigned myself to being less elegant than Chip <g.

Doug

"SA3214 @Eclipse.co.uk" <sa3214<No Spam wrote in message
...
Thanks Doug but as you point out it runs even when changing between pages

1
& 2
To get it to work as I wanted I would have to test the SelectedItem.Name
using an If statement before running the code

The response from Chip is more elegant solution but many thanks for your
suggestion




"Doug Glancy" wrote in message
...
I've never used a multipage form, but fooling with it I see that the
Change
event fires when you switch pages. Interestingly, it doesn't fire when

I
click a checkbox or enter text in a textbox. So maybe something like
this:

Private Sub MultiPage1_Change()
MsgBox Me.MultiPage1.SelectedItem.Name
End Sub

Finally, as Kramer might say, "You crave, but do you yearn?"

hth,

Doug

"SA3214 @Eclipse.co.uk" <sa3214<No Spam wrote in message
...
Once again I crave the assistance of this group

Is there an event which I can use that will be triggered when, say page
3,
of a multipage form is displayed ?

Regards to all
and
TIA









SA3214

Multipage Userform Events
 
Me too .... but I console myself with the words of Gen. Lee Butler

"However haltingly, we have made some progress."

<g




"Doug Glancy" wrote in message
...
I've pretty much resigned myself to being less elegant than Chip <g.

Doug

"SA3214 @Eclipse.co.uk" <sa3214<No Spam wrote in message
...
Thanks Doug but as you point out it runs even when changing between pages

1
& 2
To get it to work as I wanted I would have to test the SelectedItem.Name
using an If statement before running the code

The response from Chip is more elegant solution but many thanks for your
suggestion




"Doug Glancy" wrote in message
...
I've never used a multipage form, but fooling with it I see that the
Change
event fires when you switch pages. Interestingly, it doesn't fire when

I
click a checkbox or enter text in a textbox. So maybe something like
this:

Private Sub MultiPage1_Change()
MsgBox Me.MultiPage1.SelectedItem.Name
End Sub

Finally, as Kramer might say, "You crave, but do you yearn?"

hth,

Doug

"SA3214 @Eclipse.co.uk" <sa3214<No Spam wrote in message
...
Once again I crave the assistance of this group

Is there an event which I can use that will be triggered when, say
page
3,
of a multipage form is displayed ?

Regards to all
and
TIA











SA3214

Multipage Userform Events
 
Me too .... but I console myself with the words of Gen. Lee Butler

"However haltingly, we have made some progress."

<g




"Doug Glancy" wrote in message
...
I've pretty much resigned myself to being less elegant than Chip <g.

Doug

"SA3214 @Eclipse.co.uk" <sa3214<No Spam wrote in message
...
Thanks Doug but as you point out it runs even when changing between pages

1
& 2
To get it to work as I wanted I would have to test the SelectedItem.Name
using an If statement before running the code

The response from Chip is more elegant solution but many thanks for your
suggestion




"Doug Glancy" wrote in message
...
I've never used a multipage form, but fooling with it I see that the
Change
event fires when you switch pages. Interestingly, it doesn't fire when

I
click a checkbox or enter text in a textbox. So maybe something like
this:

Private Sub MultiPage1_Change()
MsgBox Me.MultiPage1.SelectedItem.Name
End Sub

Finally, as Kramer might say, "You crave, but do you yearn?"

hth,

Doug

"SA3214 @Eclipse.co.uk" <sa3214<No Spam wrote in message
...
Once again I crave the assistance of this group

Is there an event which I can use that will be triggered when, say
page
3,
of a multipage form is displayed ?

Regards to all
and
TIA













All times are GMT +1. The time now is 02:24 AM.

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