Dialog Box will keep closing
Forums
If have follows the Turorial: Dialog Project Part 2 Keeping dialog open - YouTube
But somehow the Box keeps on closing. Does anybody have a Idea why this is happening?
Option Explicit
Dim sFilename As String
Dim bExitScript As Boolean
Sub Main
Call menu()
End Sub
Function menu()
Dim dlg As DialogDemo
Dim button As Integer
button = Dialog(dlg)
If button = 0 Then bExitScript = True
End Function
Function displayIt(ControlID$, Action%, SuppValue%)
Dim bExitMenu As Boolean
Select Case Action%
Case 1
Case 2
Select Case ControlID$
Case "OKButton1"
Case "CancelButton1"
End Select
End Select
If bExitMenu Then
displayIt = 0
Else
displayIt = 1
End If
End Function
Hi Mightyyy
Hi Mightyyy
Here is the additional code to keep the dialog open.
In the attached file I also added two additional buttons, if you now select them the dialog won't close, if you select the OK or Cancel button it will close.