+ Reply to Thread
Results 1 to 4 of 4

Default Values [on UserForm]

  1. #1
    Registered User
    Join Date
    12-26-2017
    Location
    New Hampshire, USA
    MS-Off Ver
    2016
    Posts
    18

    Default Values [on UserForm]

    Hello,

    I need a little help regarding default values in an userform.
    When I click on "Calculated ESALs" button in the Input Page, the "motorcycle" section directly appears and I wanted to fill the sections with some default values. I mean when I click on the button, some default values should be appeared on the sections of motorcycle. It is working for other vehicle types like passenger cars etc. but somehow the dafult values are not appearing only for motorcycle section. How can I fix it?
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Default Values

    The defaults are set only when the combobox is updated, so when the form is first displayed the fields are blank. I changed your combobox click event to be SetDefaults. I added another sub at the top that runs whenever your form is displayed, and it calls SetDefaults. The combobox change event now also calls setdefaults.
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    12-26-2017
    Location
    New Hampshire, USA
    MS-Off Ver
    2016
    Posts
    18

    Re: Default Values [on UserForm]

    This is great, thank you!

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Default Values [on UserForm]

    You're welcome

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Userform Default Value of Dropdown
    By adamheon in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-23-2016, 05:35 PM
  2. Userform Combobox - select from list, store this as default each time userform loads
    By thecdnmole in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-19-2014, 07:48 AM
  3. Userform show (default tab)
    By ilovelagar in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-24-2009, 03:32 PM
  4. Replies: 2
    Last Post: 11-17-2008, 09:14 PM
  5. Default date in a UserForm box
    By excelnut1954 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 12-29-2005, 01:50 PM
  6. Default value of a List Box on a UserForm
    By SailFL in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-19-2005, 07:05 AM
  7. Userform Yes - No Default
    By Moe in forum Excel General
    Replies: 2
    Last Post: 05-26-2005, 06:30 PM

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