Hi! all,
How enter a date say "1/22/2012" in the immediate window to debug an UDF? Thanks in advance.:o
Printable View
Hi! all,
How enter a date say "1/22/2012" in the immediate window to debug an UDF? Thanks in advance.:o
Your question is kind of vague. If there is a variable that you want to have that date for test purposes, you would need to Break your program (assuming it did not issue a Break on its own due to an error) and then set that variable equal to that date, and then try continuing your program. For example, if your program is in Break mode and you want to set MyDate equal to 1/22/2012, you could do it either this way...
MyDate = DateSerial(2012,1,22)
or this way...
MyDate = CDate("1/22/2012")
Just taking a guess at what you intended to ask. If you want to test your UDF by passing a date argument, you could do this
YOURUDF #1/22/2012#