+ Reply to Thread
Results 1 to 7 of 7

Formatting fields in User Forms

  1. #1
    Registered User
    Join Date
    01-16-2007
    Posts
    4

    Formatting fields in User Forms

    Hi,

    I have a question that I have not been able to figure out. I am trying to change the formatting of how my fields in my user form is shown (i.e. just the estethic view before the form is recorded). Is this possible? E.g. how would I change a forms view with data 1,200,565 to show as $1,200,565 instead of just 1200565? I am trying to tweak the code, but have been unable to succeed so far...

    Any tips are greatly appreciated!!

    Thanks,
    Max

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good evening maxh

    You have to do it via code :
    Please Login or Register  to view this content.
    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    I have not played around with forms much.

    The only way I know on how to do it is in code

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    01-16-2007
    Posts
    4

    Thanks

    Thanks for your quick reply. I am still unable to see the new format in the user form though. I have so far tried to alter the code under the "UserForm_Initialize" section, which is also where I populate the various lists for my combination boxes, etc.

  5. #5
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Hi maxh

    Can't see where you're going wrong - the code that I and mudraker suggested works perfectly well. I've attached a very quick'n'dirty example showing the code at work.

    HTH

    DominicB
    Last edited by dominicb; 08-19-2008 at 04:29 AM.

  6. #6
    Registered User
    Join Date
    01-16-2007
    Posts
    4

    Thanks

    Hi DominicB,

    Thank you for the zip file. It works well for showing the format when pushing the button, although what I was looking for was a way to automatically see the field update in the specific format when "tab-ing" to the next field. That way its easier for the user to see the exact dollar value (often in billions) before hitting the ok button.

    Thanks,
    Max

  7. #7
    Registered User
    Join Date
    01-16-2007
    Posts
    4

    Thanks (2)

    I used your file and was able to modify it to my spreadsheet, and it finally works. Basically, I just created a "Private Sub textbox_Change()" section.

    Thanks again!

    Max

+ 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