Macro on Cell Change (Again)
Posted by JAF on May 17, 2000 2:45 AM
I need to run a macro that opens another spreadsheet whenever any cell in Column D is completed with the text "Yes".
I already have the basic code for this (from Celia) which is as follows:
Private Sub Worksheet_Change(ByVal Target As Range)
If ActiveCell.Column = 4 then Call macro_name
End Sub
There are however 2 problems with the above:
1) If I enter a value in column D and then press Tab (or Shift+Tab), the macro does not run because the ActiveCell is no longer in Column D.
2) The macro will run (when either Enter, CursorUp or CursorDown is pressed), but it runs irrespective of the value in Column D - I only want it to run when "Yes" is entered.
I can't change the number of the Column reference to 5 because a user could input data in Column E and then press Return which would run the macro (as it currently stands) which I do not want to happen.
Any suggestions as to how I get around this?
Cheers - JAF