Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form Text Box
How can I create a text box that will return a single?
I have user form that has two labels and one text box. Label One shows the base rate. Text Box allows the user input a markup. Label Two should show the total rate, consisting of the markup and the base rate. I programmed a label.caption update at the text box change event, but I get a data mismatch because the text box returns text even if the input is numeric. Also, how can I configure the text box so that all values input show as percentages, similar to the % format on a normal worksheet cell? Thanks, Paul -- Paul |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form Text Box
Paul,
Regarding the data mismatch: Need to use function like CSng to convert the textbox string to a single data type. sMarkup = CSng(UserForm.TextBox.Value) You may also want to validate what the user enters, with IsNumeric function. Not sure about the format question. George |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form Text Box
How can I create a text box that will return a single? <<<<
You may need to contact a dating service for this. ;-) "Paul" wrote: How can I create a text box that will return a single? I have user form that has two labels and one text box. Label One shows the base rate. Text Box allows the user input a markup. Label Two should show the total rate, consisting of the markup and the base rate. I programmed a label.caption update at the text box change event, but I get a data mismatch because the text box returns text even if the input is numeric. Also, how can I configure the text box so that all values input show as percentages, similar to the % format on a normal worksheet cell? Thanks, Paul -- Paul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Highlight/Select text in User Form? | Excel Discussion (Misc queries) | |||
Adding a new text box to user form | Excel Discussion (Misc queries) | |||
User Form: Cannot Update Text Box | Excel Discussion (Misc queries) | |||
Adding text file to a user form? | Excel Programming | |||
Clear Contents Of A Text Box In User Form | Excel Programming |