So what I want to do is enter yes or no into a cell and have YES answer run a macro and have NO answer run a macro. ...
I am oh so close, the problem is that I can't get the code to run on the cell i enter yes or no into as once I hit enter the "ActiveCell" is now my new cell. What am i doing wrong?
Private Sub Worksheet_Change(ByVal Target As Range)
'...is ths right? orshould it be selectchange?
Dim ACTCEL As String
Curr_Addr = ActiveCell.Address
Range(Curr_Addr).Select
ACTCEL = ActiveCell
If ACTCEL = "yes" Then
Run "Show_donkey1" 'shows donkey picture.
Range(Curr_Addr).Select
Application.EnableEvents = True
ElseIf ACTCEL = "no" Then
...will run anotehr macro
End If
End Sub
I am oh so close, the problem is that I can't get the code to run on the cell i enter yes or no into as once I hit enter the "ActiveCell" is now my new cell. What am i doing wrong?
Private Sub Worksheet_Change(ByVal Target As Range)
'...is ths right? orshould it be selectchange?
Dim ACTCEL As String
Curr_Addr = ActiveCell.Address
Range(Curr_Addr).Select
ACTCEL = ActiveCell
here is where I run into problems. As soon as I hit enter the "ActiveCell" value changes and the rest of the code starts using the current cell. For instance if i type Yes into A1, as soon as I hit Enter and go into cell A2 the the "ActiveCell" is now A2...where I havne't entered anything into.
If ACTCEL = "yes" Then
Run "Show_donkey1" 'shows donkey picture.
Range(Curr_Addr).Select
Application.EnableEvents = True
ElseIf ACTCEL = "no" Then
...will run anotehr macro
End If
End Sub