I currently have this code for a vbOKCancel message box.
MsgBox("Load window?", vbOKCancel)
If vbOK Then
RaiseWindow()
End If
If vbCancel Then
Exit Sub (I want this line to cancel/close the message box)
End If
However this causes the WinForm "Window" to open whichever button is clicked? Is there something wrong with this?
I have also tried using If>Elseif but get the same results
MsgBox("Load window?", vbOKCancel)
If vbOK Then
RaiseWindow()
End If
If vbCancel Then
Exit Sub (I want this line to cancel/close the message box)
End If
However this causes the WinForm "Window" to open whichever button is clicked? Is there something wrong with this?
I have also tried using If>Elseif but get the same results
Last edited: