Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clearing a date vaiable
Hi
Once you have a date variable defined it will continue to return true to IsDate() function. You can set the date to 0, to clear the date but that will still return true to the IsDate function call. "PSKelligan" wrote: Hi all, Hopefully a silly but fast question. Sub myCode() Dim myDate As Date myDate = "" 'Syntax meant for a string... While Not While Not (IsDate(myDate)) 'Misc code here Wend End Sub In the line, myDate = "", what would be the right way to empty this date variable? I tried myDate = Nothing and that did not work either. -- Thanks, Patrick |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clearing a date vaiable
Sub myCode()
dim myDate As Date myDate = Empty While Not (IsDate(myDate)) 'Misc code here Wend End Sub -- HTH RP (remove nothere from the email address if mailing direct) "Alok" wrote in message ... Hi Once you have a date variable defined it will continue to return true to IsDate() function. You can set the date to 0, to clear the date but that will still return true to the IsDate function call. "PSKelligan" wrote: Hi all, Hopefully a silly but fast question. Sub myCode() Dim myDate As Date myDate = "" 'Syntax meant for a string... While Not While Not (IsDate(myDate)) 'Misc code here Wend End Sub In the line, myDate = "", what would be the right way to empty this date variable? I tried myDate = Nothing and that did not work either. -- Thanks, Patrick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Clearing cells without clearing formulas | Excel Discussion (Misc queries) | |||
HOW TO CARRY A VAIABLE RESULTS FROM EXCEL SHEET PROCEDURE TO A MODULE | Excel Discussion (Misc queries) | |||
Clearing data past its sell by date! | Excel Discussion (Misc queries) | |||
vaiable colours for selection in chart | Charts and Charting in Excel | |||
Assign vaiable to a cell - gold | Excel Worksheet Functions |