+ Reply to Thread
Results 1 to 3 of 3

User Form Text Box

  1. #1
    Paul
    Guest

    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. #2
    George
    Guest

    Re: 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. #3
    gocush
    Guest

    RE: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1