Range existence check
I get the 1004 error message when Excel processes either of the following
statements:
Range("D_CARDS").Delete
or
set rng = RANGE("D_CARDS")
"Bob Phillips" wrote:
If it doesn't exist, how do you know it didn't work?
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"DoctorG" wrote in message
...
I need to delete a range and re-create it later in my code. I tried the
following but it doesn't work if the range does not exist:
On Error Resume Next
Range("D_CARDS").Delete
How can I check for the existence of a range and, in case it does exist,
delete it, otherwise continue with my code?
|