I have written a macro that basically just shows some comparisons between
team members in a userform. The problem I have is a sub in the userform that
is called whenever a combobox is changed. If I follow through the code it
will just quit in the middle of the sub where i have marked and goes back to
the combobox _change sub that called it and finishs it out. Any help would be
appreciated.
Private Sub Userform_Update()
Select Case Score1.Value - Score2.Value
Case Is = 0
WScore.Text = "Tied"
MOVScore.Text = "Tied"
Case Is > 0
WScore.Text = User1.Text
MOVScore.Value = Format(expression:=Score1.Text / Score2.Text -
1, Format:="Percent")
Case Is < 0
WScore.Text = User2.Text
MOVScore.Value = Format(expression:=Score2.Text / Score1.Text -
1, Format:="Percent")
End Select
Select Case WU1.Value - WU2.Value
Case Is = 0
WWU.Text = "Tied"
MOVWU.Text = "Tied"
Case Is > 0
WWU.Text = User1.Text
MOVWU.Value = Format(expression:=WU1.Text / WU2.Text - 1,
Format:="Percent")
Case Is < 0
WWU.Text = User2.Text
MOVWU.Value = Format(expression:=WU2.Text / WU1.Text - 1,
Format:="Percent")
End Select
Select Case CPU71.Value - CPU72.Value
Case Is = 0
WCPU7.Text = "Tied"
MOVCPU7.Text = "Tied"
Case Is > 0
WCPU7.Text = User1.Text
MOVCPU7.Value = Format(expression:=CPU71.Text / CPU72.Text - 1,
Format:="Percent")
Case Is < 0
WCPU7.Text = User2.Text
MOVCPU7.Value = Format(expression:=CPU72.Text / CPU71.Text - 1,
Format:="Percent")
///HERE IS WHERE IT EXITS///
End Select
Select Case CPU501.Value - CPU502.Value
Case Is = 0
WCPU50.Text = "Tied"
MOVCPU50.Text = "Tied"
Case Is > 0
WCPU50.Text = User1.Text
MOVCPU50.Value = Format(expression:=CPU501.Text / CPU502.Text -
1, Format:="Percent")
Case Is < 0
WCPU50.Text = User2.Text
MOVCPU50.Value = Format(expression:=CPU502.Text / CPU501.Text -
1, Format:="Percent")
End Select
Select Case Global1.Value - Global2.Value
Case Is = 0
WGlobal.Text = "Tied"
MOVGlobal.Text = "Tied"
Case Is > 0
WGlobal.Text = User2.Text
MOVGlobal.Value = Format(expression:=Global2.Value /
Global1.Value - 1, Format:="Percent")
Case Is < 0
WGlobal.Text = User1.Text
MOVGlobal.Value = Format(expression:=Global1.Value /
Global2.Value - 1, Format:="Percent")
End Select
End Sub
Bookmarks