Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I create list validation from code without the text being converted into date format?
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" -- BrianB ------------------------------------------------------------------------ BrianB's Profile: http://www.excelforum.com/member.php...info&userid=55 View this thread: http://www.excelforum.com/showthread...hreadid=487878 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
when loading csv file to Excel, cells get converted to date format | Excel Discussion (Misc queries) | |||
Date converted to Text Number | Excel Discussion (Misc queries) | |||
Text is being converted to Date | Excel Worksheet Functions | |||
data validation list drop down text format too small | Excel Worksheet Functions | |||
code to convert date from TEXT format (03-02) to DATE format (200203) | Excel Programming |