+ Reply to Thread
Results 1 to 8 of 8

Having difficulty with formatting combo box to display time in h:mm AM/PM.

  1. #1
    Registered User
    Join Date
    10-30-2020
    Location
    Minnesota
    MS-Off Ver
    10
    Posts
    4

    Having difficulty with formatting combo box to display time in h:mm AM/PM.

    This is my first experience working with VBE.

    I have attached a small Excel file with an example form that contains two combo boxes that need to display time in h:mm AM/PM. The cboStartTime combo box drop down currently displays both the formatted time value as well as the decimal value. We are trying to get the drop down to display the time format only.

    The EndTime combo box provides a drop down list based on the value entered in the StartTime Combo Box. However it only displays properly when you advance to the next combo box.


    The last combo box in this example file is only there to assist with displaying the proper value in the EndTime Combo box.

    I have tried to incorporate a number of sub routines to clean this up, but nothing seems to be working as desired.

    Hopefully someone can provide some guidance to help remedy these two issues we are facing.

    Appreciate any help that can guide us to a solution.

    Thanks!
    Attached Files Attached Files
    Last edited by wloken; 11-02-2020 at 04:29 PM. Reason: Need to upload file

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,957

    Re: Having difficulty with formatting combo box to display time in h:mm AM/PM.

    You saved the file without your macros.....
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    10-30-2020
    Location
    Minnesota
    MS-Off Ver
    10
    Posts
    4

    Re: Having difficulty with formatting combo box to display time in h:mm AM/PM.

    Sorry about that. I reloaded the file in xlsm format.

    Thanks!

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,957

    Re: Having difficulty with formatting combo box to display time in h:mm AM/PM.

    I don't see any attachments now

  5. #5
    Registered User
    Join Date
    10-30-2020
    Location
    Minnesota
    MS-Off Ver
    10
    Posts
    4

    Re: Having difficulty with formatting combo box to display time in h:mm AM/PM.

    Sorry. Should be there now. Thanks!

  6. #6
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,957

    Re: Having difficulty with formatting combo box to display time in h:mm AM/PM.

    Try replacing this line in the sub cboStartTime_AfterUpdate()


    Please Login or Register  to view this content.
    with this:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-30-2020
    Location
    Minnesota
    MS-Off Ver
    10
    Posts
    4

    Re: Having difficulty with formatting combo box to display time in h:mm AM/PM.

    Very Helpful! That did the trick! Thank you for your super quick attention and support!

  8. #8
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,957

    Re: Having difficulty with formatting combo box to display time in h:mm AM/PM.

    Great! Thanks for letting me know.

+ 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. Help With Formatting Time Within Combo Box
    By notoriusjt2 in forum Excel General
    Replies: 7
    Last Post: 07-26-2016, 03:07 PM
  2. [SOLVED] display relevant info in one combo box when selecting a value from another combo box
    By mailblade in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-31-2015, 09:28 AM
  3. [SOLVED] Difficulty with elapsed time
    By tomwxyz in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 07-25-2015, 01:19 PM
  4. Replies: 8
    Last Post: 12-26-2013, 02:23 PM
  5. Replies: 6
    Last Post: 02-06-2012, 12:25 PM
  6. Difficulty formatting cells as dates after SP2
    By bristrader in forum Excel General
    Replies: 1
    Last Post: 05-21-2009, 08:24 PM
  7. [SOLVED] difficulty with conditional formatting
    By Deb in forum Excel General
    Replies: 0
    Last Post: 03-23-2005, 03:06 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