Is there a command to run a macro as the condition for TRUE in an IF statement?
Is there a command to run a macro as the condition for TRUE in an IF statement?
if x=y then
<<macroname>>
end if
Could you tell where is the IF statment located? in a Cell or in a Macro? it depends...
Originally Posted by bhalooneel
It's in the cell.
1. Put your IF in the cellOriginally Posted by bhalooneel
2. Label the cell (lets say SwCell)
3. put your macro in the Worksheet.Calculate. Something like
4. Pull the result of the Cell to your Macro with Range("Condition onSwCell")![]()
Please Login or Register to view this content.
Your Macro will run every time the worksheet is calculated, if it in automatic calculation, always will be testting your condition and doing your code.
Hope this helps
Regards
Jose Luis
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks