Sub RunLog2(strLogText As String)
If General.bLog Then
Log(strLogText)
End If
If General.bLog2SQL Then
StoreLogMsg(strLogText)
End If
If General.bLog2Msg Then
'otherwise the previous dialog will be replaced by a new one
'need to press OK first
'------------------------------------------------------------
Do While Dialog.IsVisible
Sleep(1)
Loop
Dim rs As ResumableSub = Dialog.Show(Activity, Array As Object("OK", "Stop Msg"), _
"Log text", "", strLogText, _
-1, False, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Null, False, arrS, 0)
Wait For (rs) Complete (strResult As String)
If strResult = "Stop Msg" Then
General.bLog2Msg = False
chkLog2Msg.Checked = False
End If
End If
End Sub