Is there a way to run a macro from a macro with an If Statement?
What I am trying to do is run "Macro2" if any cell in Column W on Sheet "Sheet_1" contains and error.
If this can be done I will put it at the end of an existing macro I have.
Below is a very basic macro I have. I cannot figure out how to put an if statement into the Application.Run portion.
What I am trying to do is run "Macro2" if any cell in Column W on Sheet "Sheet_1" contains and error.
If this can be done I will put it at the end of an existing macro I have.
Below is a very basic macro I have. I cannot figure out how to put an if statement into the Application.Run portion.
VBA Code:
Sheets("Sheet_1").Select
Columns("W:W").Select
Selection.SpecialCells(xlCellTypeFormulas, 16).Select
Application.Run "'" & ActiveWorkbook.Name & "'" & "!Macro2"