Glowackattack
New Member
- Joined
- Mar 5, 2008
- Messages
- 38
Hi All,
I have the following code in a module that works fine for referencing a textbox on a page of a multipage on a userform, but I'm stumped trying to figure out how to reference the page object itself vs the multipage then referencing the page later. My code is:
what i want to do is something like this: (but doesnt work)
I'm sure this is pretty simple but i'm having trouble figuring it out. Thanks!!
I have the following code in a module that works fine for referencing a textbox on a page of a multipage on a userform, but I'm stumped trying to figure out how to reference the page object itself vs the multipage then referencing the page later. My code is:
Code:
Dim a As MultiPage
Set a = UserForm1.MultiPage1
a.Page2.P2_ScoreTotal.Value = (Val(a.Page2.P2_Q1_Score.Text) + Val(a.Page2.P2_Q2_Score.Text) + Val(a.Page2.P2_Q3_Score.Text) + Val(a.Page2.P2_Q4_Score.Text)) / 4
what i want to do is something like this: (but doesnt work)
Code:
Dim a As (What? Page?)
Set a = UserForm1.MultiPage1.Page2
a.P2_ScoreTotal.Value = (Val(a.P2_Q1_Score.Text) + Val(a.P2_Q2_Score.Text) + Val(a.P2_Q3_Score.Text) + Val(a.P2_Q4_Score.Text)) / 4
I'm sure this is pretty simple but i'm having trouble figuring it out. Thanks!!