Textbox and label formulas-continue

D

damorrison

In a userform I would like to have Label17 caption that shows the
value of a formula something like:
If ListBox2= H.W.R. THEN TextBox4 - .125 else TextBox4 + .125

How can this be done???
 
C

Chip Pearson

I'm not entirely clear about your question, but try something
like

If ListBox2.Value = "H W R" Then
TextBox4.Text = "-.125"
Else
TextBox4.Text = "+.125"
End If


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

davesexcel

Private Sub ListBox2_Change()
If ListBox2.Value = "H.W.R." Then
Label17.Caption = TextBox4.Text - 0.125
Else
Label17.Caption = TextBox4.Text + 0.125
End If

End Sub
 
Top