@Mehmetcik. Thank for the help. Although I'm not an expert with VBA, however, from the 2nd code, it seems like you assume I'm using a form. But I don't. I'm using the ActiveX control TextBox. I have attached the spreadsheet for reference
@Mehmetcik. Thank for the help. Although I'm not an expert with VBA, however, from the 2nd code, it seems like you assume I'm using a form. But I don't. I'm using the ActiveX control TextBox. I have attached the spreadsheet for reference
No Spreadsheet Seen.
The following seems to work.
I created the textbox using "Developer - Insert - Textbox"
I opened the revelent macro module by clicking on Design Mode then right clicking on the text box and selecting view code.
Paste the text below into that window.
Deselect Design mode.
ENJOY.
Public oldvalue As Double
Private Sub TextBox1_Change()
temp = TextBox1.Value
If Right(temp, 1) = "%" Then temp = Left(temp, Len(temp) - 1)
If Not IsNumeric(temp) Then temp = oldvalue
oldvalue = temp
TextBox1.Value = Format(oldvalue / 100, "0.00%")
End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks