I'm getting compile error Else without if

Iron Contributor

I'm getting "compile error Else without if". Anyone know why?

 

Sub AddSymbols()
'
'
'

'

Range("BC3:BI3").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True

A = MsgBox("Add Additional Symbols?", vbQuestion + vbYesNo, "HonorSystem24")


ElseIf A = vbNo Then

Call PasteLastLine


If A = vbYes Then

End If

End Sub

2 Replies

@Greg Bonaparte Update your code to:

Sub AddSymbols()
'
'
'

'

Range("BC3:BI3").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
A = MsgBox("Add Additional Symbols?", vbQuestion + vbYesNo, "HonorSystem24")
If A = vbNo Then
    Call PasteLastLine
ElseIf A = vbYes Then
End If
End Sub

how to adjust size of excel sheet and keep it open and accessible while viewing another app or another excel sheet.