+ Reply to Thread
Results 1 to 4 of 4

VBA code for introducing hours in ComboBox

  1. #1
    Forum Contributor
    Join Date
    07-22-2012
    Location
    Spain
    MS-Off Ver
    Excel 2008
    Posts
    304

    VBA code for introducing hours in ComboBox

    Hi,

    Im looking the way of introducing hours in a ComboBox using a VBA code.

    The only solution I have already find is doing this:

    Please Login or Register  to view this content.

    And then in Range (A1:A289) I put the following hours:

    00:00
    00:05
    00:15
    00:20
    00:25
    00:30
    00:35
    00:40
    00:45
    00:50
    etc...
    ...
    ...
    ...
    23:45
    23:50
    23:55
    24:00

    As I said, this is what I have already manage to do as a solution but Im sure there must be an easiest way of doing it. It would be great (and its what Im forward to) to do this code with all data in the VBA, without putting in any Sheet of the workbook all the dates in a Range.

    Thanks a lot

    Regards,


    pezalmendra

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: VBA code for introducing hours in ComboBox

    Use two comboboxes. One for hours, one for minutes.

    Where are the comboboxes?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: VBA code for introducing hours in ComboBox

    Hi, pezalmendra,

    I assumed a CB on a Userform:

    Please Login or Register  to view this content.
    Ciao,
    Holger

  4. #4
    Forum Contributor
    Join Date
    07-22-2012
    Location
    Spain
    MS-Off Ver
    Excel 2008
    Posts
    304

    Re: VBA code for introducing hours in ComboBox

    Holger,

    Thank you very much! Just what I was looking for


+ 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