When using the ActiveCell.ShowDependents command, there is an annoying beep when no dependents exist. I have not been able to mute the beep nor find any tests to determine if dependents exist -- which don't cause a beep on their own.
Any ideas?
T.I.A.
Show Dependents
-
- 5StarLounger
- Posts: 689
- Joined: 27 Jan 2010, 16:45
- Location: Ottawa, Ontario, Canada
Show Dependents
Regards
Don
Don
-
- Administrator
- Posts: 78794
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Show Dependents
Try this:
It will only work with dependents on the same sheet; if there are dependents on other sheets or in other workbooks, it becomes more complicated.
Code: Select all
Dim lngCount As Long
On Error Resume Next
lngCount = ActiveCell.Dependents.Count
On Error GoTo 0
If lngCount > 0 Then
ActiveCell.ShowDependents
End If
Best wishes,
Hans
Hans