Thank you Bob, for both the answer and the general approach of using On
Error. I will use this in the future instead of my (Homer Simpson) usual
practice of banging my head into a wall until a 1004 error pops up.
--
Gary's Student
"Bob Phillips" wrote:
> Dim fEmpty
> Dim tmp As Range
> fEmpty = IsEmpty(ActiveCell)
> If fEmpty Then
> On Error Resume Next
> Set tmp = ActiveCell.DirectPrecedents
> On Error GoTo 0
> If Not tmp Is Nothing Then
> fEmpty = False
> End If
> On Error Resume Next
> Set tmp = ActiveCell.DirectDependents
> On Error GoTo 0
> If Not tmp Is Nothing Then
> fEmpty = False
> End If
> End If
>
>
> --
> HTH
>
> Bob Phillips
>
> (remove nothere from email address if mailing direct)
>
> "Gary''s Student" <GarysStudent@discussions.microsoft.com> wrote in message
> news:BC839D72-C567-4216-B91A-8D42FBD95A11@microsoft.com...
> > How can I tell if a cell is free (available)?
> > Free would mean empty and not referred to by another cell on the
> worksheet.
> >
> > --
> > Gary''s Student
>
>
>
Bookmarks