Forum Discussion

Denise5552145's avatar
Denise5552145
Copper Contributor
Mar 07, 2019

If Esle in VBA

Below is my what I have coded in VBA.  I keep getting error message "Block If without End If"

Seems like this should be very simple but I'm having a problem.

Can someone help me resolve?

 

If ActiveCell = OptBtn_Q111 Then
Sheets("Audit").Range("Data_Start").Offset(TargetRow, 7).Value = "Yes"
Else
If ActiveCell = OptBtn_Q112 Then
Sheets("Audit").Range("Data_Start").Offset(TargetRow, 7).Value = "No"
Else
Sheets("Audit").Range("Data_Start").Offset(TargetRow, 7).Value = "N/A"

End If

2 Replies

  • Denise5552145's avatar
    Denise5552145
    Copper Contributor
    To give a little more clarity, I'm using option buttons to answer questions with Yes, No, & Not Applicable,.

Resources