Userform format question
Prep for a pre-employment Excel test with Job Test Prep
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 6 of 6

Thread: Userform format question

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Location
    Stockton, California
    Posts
    281
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Hi, me again

    another quick question im having trouble finding the answer to. Can i format the values of a userform? I know i can format them when i transfer them to my worksheet, but i would like for example:

    If someone inputs 5.00 into a textbox on the userform, the form automatically changes it to $5.00.

    also, does anyone know any helpful websites with some userform information? I'd like to read up more. Maybe then i wouldn't have so many questions

    Thanks again

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Bogota, Colombia
    Posts
    11,959
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Yes, you can.

    For example:

    Code:
    Private Sub TextBox1_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
    TextBox1 = Format(TextBox1, "$#,##0.00")
    End Sub
    Regards,

    Juan Pablo González
    http://www.juanpg.com

  3. #3
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Bogota, Colombia
    Posts
    11,959
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    About websites... I don't know... I firmly believe in self help and practice (And of course, asking here !!)
    Regards,

    Juan Pablo González
    http://www.juanpg.com

  4. #4
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Self help includes books, I hope. Books are good. I've read a couple.

    Learning here is good, but books are better. You'll get better structure using books. This message board is great for getting elusive answers, but books are good.

    There are books everywhere.

    I'm sorry, it's Holy Thursday and I am completely exhausted. TFI a long weekend.

    Also, Juan's been adding onto people's posts all day. It's time for a taste of his own medicine.

  5. #5
    Board Regular
    Join Date
    Feb 2002
    Location
    Stockton, California
    Posts
    281
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    thanks yet again Juan

  6. #6
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Another under rated help source F1 while in
    the VBA Editor


    Ivan

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com