Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have bee trying to work an example vb problem and keep
getting a compile error: else without if. I do not understand why. Here is the code. Private Sub CndDisplayMsgbox_Click() Dim ButtonChoice As Integer Dim iconchoice As Integer Dim answer As Integer If OptOKOnly.Value = True Then ButtonChoice = vbOKOnly ElseIf OptOKCancel.Value = True Then ButtonChoice = vbOKCancel ElseIf OptAbortRetryIgnore.Value = True Then ButtonChoice = vbAbortRetryIgnore ElseIf OptYesNoCancel.Value = True Then ButtonChoice = vbYesNoCancel ElseIf OptYesNo.Value = True Then ButtonChoice = vbYesNo ElseIf OptRetryCancel.Value = True Then ButtonChoice = vbRetryCancel Else: MsgBox "Unexpected Error in If statement!" End End If Any ideas would be greatly appreciated. TIA |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Solver - error - Compile Error | Excel Discussion (Misc queries) | |||
help with this error-Compile error: cant find project or library | Excel Discussion (Misc queries) | |||
How do I get rid of "Compile error in hidden module" error message | Excel Discussion (Misc queries) | |||
Compile error in hidden module error | Excel Programming |