Hi All,
I'm trying to check if a named range "ActiveCells" exists before deleting it in VBA but can't seem to get the syntax right, I have tried:
Code
If Range("Activecells") Is Nothing Then Resume Next Else: ActiveWorkbook.Names("ActiveCells").Delete
'AND
If ActiveWorkbook.Names("Activecells") Is Nothing Then Resume Next Else: ActiveWorkbook.Names("ActiveCells").Delete
Can anyone point me in the right direction? I have tried searching but I can only find threads about checking for named objects or about using the toolbars to add/delete named ranges.
Thanks!
Averil[hr]*[/hr] Auto Merged Post;[dl]*[/dl]Sorry - I did find this one in the answers above after my post was submitted but not in my original search:
http://www.ozgrid.com/forum/showthread.php?t=76641
Thanks,
Averil