|
-
Jan 5th, 2000, 04:08 AM
#1
Thread Starter
Junior Member
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?
-
Jan 5th, 2000, 05:20 AM
#2
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]
-
Jan 5th, 2000, 01:43 PM
#3
Guru
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
-
Jan 6th, 2000, 04:44 AM
#4
Addicted Member
Hi.
Why not include objExcel ISEMPTY() function!
Try it. If it doesn't work let me know.
I have it somewhere.
Good Luck.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|