+ Reply to Thread
Results 1 to 6 of 6

format Date in Listbox for two columns of Dates

  1. #1
    Registered User
    Join Date
    02-13-2011
    Location
    Glasgow
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    9

    format Date in Listbox for two columns of Dates

    There is a solution to to this on this site, which resolves us to uk dates in one column, col A, i have a second column, col G, which remains the same. How do I amend the code to convert two columns.

    **Below code was submitted by MickG

    Please Login or Register  to view this content.
    If i resolve this once I will post the code. Thanks for any help.

    Ally.

  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: format Date in Listbox for two columns of Dates

    Try this
    Please Login or Register  to view this content.
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    02-13-2011
    Location
    Glasgow
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    9

    Re: format Date in Listbox for two columns of Dates

    Hi RoyUk

    Yep that worked, thanks very much, however it has cast up another problem. I have a textbox that should appear when an item in the listbox is selected. Now I can make that visible, but when i enter a date into this textbox it should enter a date into the relevant field in this case col H. It appears to be putting a completely different value, here is the code i am using to populate col h

    Please Login or Register  to view this content.
    Any ideas would be appreciated, and thanks again for your help on the previous code.

    Ally.

  4. #4
    Registered User
    Join Date
    02-13-2011
    Location
    Glasgow
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    9

    Re: format Date in Listbox for two columns of Dates

    ok checked the code above and it is actually placing the textbox value in the row above the one selected in the listbox.

  5. #5
    Registered User
    Join Date
    02-13-2011
    Location
    Glasgow
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    9

    Re: format Date in Listbox for two columns of Dates

    Ok i think i have solved one of the problems

    here is the code again with the items i changed in bold

    Please Login or Register  to view this content.
    perhaps someone could explain why when i click on an item in the listbox the items that are set to not show until an item is selected,does not become visible. I also do not quite understand why changing the code to +2 as apose to +1 fixes my problem.

    thanks again to royuk for sorting out the first issue

    Ally

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

    Re: format Date in Listbox for two columns of Dates

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!

    ListBox ListIndex starts at zero so if you are getting a Row reference using the ListIndex you must add1, plus 1 if there is a header row.

+ 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