I have a textbox in a userform so when the user keys in a number, it automatically converts it to a percentage. However, when the user keys in a 0, nothing populates in the textbox. See my code below and let me know what I need to do in order to allow the value 0 to be entered.
Code:Private Sub txtratio_Change() txtratio.Value = Format(Val(txtratio.Value) / 100, "##%") txtratio.SelStart = Len(txtratio.Value) - 1 End Sub




Reply With Quote