User Form Text Box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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,

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
 
How can I create a text box that will return a single? <<<<

You may need to contact a dating service for this. ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top