how to refer to empty cell? (1 Viewer)

SamDeMan

Registered User.
Local time
Today, 15:27
Joined
Aug 22, 2005
Messages
182
Hi

I don't use excel much, but my access vba calls on excel to excute some code. how do i test for an empty cell? i tried using isnull, = null, = "" all of which didn't work.

thanks,

sam
 

boblarson

Smeghead
Local time
Today, 12:27
Joined
Jan 12, 2001
Messages
32,059
If a cell is truly empty, you can check for ="" but, if there is so much as a space, then it really isn't empty.
 

SamDeMan

Registered User.
Local time
Today, 15:27
Joined
Aug 22, 2005
Messages
182
yeah, basically i thought about it...after i added trim() it worked. must have gotten some space, don't know how.

thanks,

sam
 

boblarson

Smeghead
Local time
Today, 12:27
Joined
Jan 12, 2001
Messages
32,059
I've been there too. It can be a pain, but if you always account for the possibility of embedded spaces in your cells, when coding with Excel, then you should be fine.
 

Users who are viewing this thread

Top Bottom