+ Reply to Thread
Results 1 to 3 of 3

How do I create list validation from code without the text being converted into date format?

  1. #1
    EG
    Guest

    How do I create list validation from code without the text being converted into date format?

    I have a cell whose validation is dynamically changed. I delete and
    create it from code. Some of the text that could be used is in the
    format of x-y (e.g. 5-7), which sometime is converted into a date (e.g.
    7-May). This happens in the Validation.Add function, which means I
    can't solve it by just formatting the cell to contain Text.


  2. #2
    Registered User
    Join Date
    08-20-2003
    Location
    Luton, England
    Posts
    63
    Don't know if this will be what you want, but we can force a cell to become text by putting an apostrophe in front. This becomes invisible in the cell.
    eg.
    '- put an apostrophe to force cell to text
    Range("A1").Value = "'" & "5-7"
    Regards
    BrianB
    Most problems are caused by starting from the wrong place.
    Use a cup of coffee to speed up all Windows processes.
    It's easy until you know how.
    -----------------------------------------

  3. #3
    EG
    Guest

    Re: How do I create list validation from code without the text being converted into date format?


    Thanks, Brian, it is a progress. The problem is that I see the
    apostrophe in the dropdown, before the value...


+ 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