Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RE: free cell

0 views
Skip to first unread message

Duke Carey

unread,
Apr 12, 2006, 9:10:02 AM4/12/06
to
check the cell's Dependent property

"Gary''s Student" wrote:

> 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

Gary''s Student

unread,
Apr 12, 2006, 9:17:02 AM4/12/06
to
thanks
--
Gary''s Student

Bob Phillips

unread,
Apr 12, 2006, 9:19:12 AM4/12/06
to
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" <GarysS...@discussions.microsoft.com> wrote in message
news:BC839D72-C567-4216...@microsoft.com...

Gary''s Student

unread,
Apr 12, 2006, 9:42:01 AM4/12/06
to
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

John Lyons

unread,
Apr 12, 2006, 11:45:02 AM4/12/06
to
or just use the Find Dependents tool on the Audit toolbar!

Bob Phillips

unread,
Apr 12, 2006, 11:49:10 AM4/12/06
to
Some of still use 2000 <vbg>

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"John Lyons" <John...@discussions.microsoft.com> wrote in message
news:41FFD689-3514-4CA4...@microsoft.com...

Duke Carey

unread,
Apr 12, 2006, 12:19:02 PM4/12/06
to
Trace Dependents/Precedents icons are available in 2000 (and '97, I think)
when you customize the toolbar & look in the Tools category<g>

Bob Phillips

unread,
Apr 12, 2006, 12:39:06 PM4/12/06
to
You are right, I had forgotten since I never use them, and was thinking of
the much stronger Evaluate facility in the XP Auditing tool <g>

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Duke Carey" <Duke...@discussions.microsoft.com> wrote in message
news:0B64281B-E6D8-427A...@microsoft.com...

0 new messages