Forum Discussion
Greg Bonaparte
Mar 21, 2020Iron Contributor
I'm getting compile error Else without if
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
Sort By
- supercheebaCopper Contributor
how to adjust size of excel sheet and keep it open and accessible while viewing another app or another excel sheet.
- JKPieterseSilver Contributor
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