Forum Discussion

Simon_Plant's avatar
15 years ago

Using DDT and checking if cell is blank

I want to be able to detect if some of the cells in my spreadsheet are blank. At the moment I get an error if it can't detect any data in the cell.



I've tried:



if DDT.CurrentDriver.Value("Date") = Null



btu this doesn't seem to pick it up correctly.



Any ideas?



Cheers.

2 Replies

  • Hello Simon



    Try using DDT.CurrentDriver.Value("Date") = ""




    Null is Used to indicate that a variable contains no valid data. One way to think of Null is that someone has explicitly set the value to "invalid", unlike Empty where the value is "not set".This is not the same as Empty or Nothing!!


    Example: x=Null 'x contains no valid data



    Reference: http://www.w3schools.com/vbScript/vbscript_ref_keywords.asp


    Thank you


    Syed



  • Hi Simon,



    Try using the GetVarType method (see the "aqObject.GetVarType" help topic). Check whether it returns varEmpty.