I want to delete any row which is "blank" in the first column. When I try this code, even though the Text show Null in debug, the If statement fails. Why?
![]()
Please Login or Register to view this content.
I want to delete any row which is "blank" in the first column. When I try this code, even though the Text show Null in debug, the If statement fails. Why?
![]()
Please Login or Register to view this content.
Hi SWMagic,
I think a variable has to be declared as a Variant AND have a "null" value at the same time for the IsNull function to return TRUE. Here's an alternativeor![]()
Please Login or Register to view this content.
or![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Well, these were good ideas, but none worked.
Is this statement reading something other than the first column?
Rng.Item(ix).Text
I mean it shouldn't matter as the debug declares Text as null.
Try:
![]()
Please Login or Register to view this content.
Nope. It deleted one line but then ignored the others. Seemed like really tight code, too. Sigh.
Can you attach the workbook where the code fails to work?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks