' Code of UserForm1
' Textboxes of the form are: txtGood, txtAverage, txtPoor, txtResult
Private Sub UserForm_Initialize()
txtGood = 3
txtAverage = 2
txtPoor = 1
MyCalc
End Sub
Sub MyCalc()
txtResult = Format(0.3 * Val(txtGood) / (Val(txtGood) + Val(txtAverage) + Val(txtPoor)), "0.0%")
End Sub
Private Sub txtAverage_Change()
MyCalc
End Sub
Private Sub txtGood_Change()
MyCalc
End Sub
Private Sub txtPoor_Change()
MyCalc
End Sub