Call Macro if no Dependents

J

Jacob

Hello All:

First of all any help would be great. I have a macro which shows the
Trace Dependents Audit Arrows. I would like to add to it to check for
any cell that contains data call a particular macro.

This other macro interacts with another application as well as excel
and puts a comment in the given selection.

The original macro looks like this:

Sub ShowDependents()
'
For Each cell In Selection
cell.ShowDependents

Next cell
End Sub

This traces any dependents. I would like for it to also for those
cells that are not blank or empty to call the other macro xyz which in
turn inserts the comment and references the external application.

Example:

Row A B
1 300 =RemoveHiddenApostrophe!A8
2
3 300
4
5 4A
6
7 5A

Cell "A1" would have a formula linking to somewhere else.

If you have any ideas they would be greatly appreciated.

Thanks,

Jacob
 
J

Jacob

Here is what I came up with. I am still have trouble when calling the
macro, but it has to do with how the second macro is written. I don't
have access to the code for it to manipulate it to work so this will
probably be the best I can do for now.

Jacob

Sub TestDependents()
'Created By Jacob Heaton
'02/28/07

For Each Cell In Selection

If Cell.HasFormula = False Then

If IsEmpty(Cell) = False Then

Call MacroName

End If

Else
Cell.ShowDependents
End If
Next

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top