-
I am reading an excel sheet from my Visual Basic application. I want the program to perform until it comes upon an empty cell. The problem is when I use this code
Do While Not objExcel.Range(cbochan1col & rowcnt).Value = Empty
Visual Basic is reading 0's as empty.
Suggestions on how to bypass this so that the program doesn't exit when coming upon a zero?
-
You could try checking the Length of the Text Property, ie.
Do While Len(objExcel.Range(cbochan1col & rowcnt).Text)
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
-
I don't believe you can access the value of a cell in EXCEL by the TEXT property, it always has to be VALUE.
Maybe evaluate this way:
do while not trim(cstr(objExcel.Range(cbochan1col & rowcnt).Value)) = ""
or Aaron's LEN() funtion suggestion will probably work too
-
Hi.
Why not include objExcel ISEMPTY() function!
Try it. If it doesn't work let me know.
I have it somewhere.
Good Luck.