Dave, Geordon
Try this code and tell me if it's OK. It works for me.
Geordon, you can replace your function call where macro's sleep 5 sec.
Gilles.
======================================================
Option Explicit
Option Base 1
Declare Sub Sleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds As Long)
Declare Function GestionDialgImprs (IdObjet as string, _
Action as integer, _
Valeur as long) as integer
Dim Mesg as string
Dim EndDialog as integer
SUB MAIN()
On Error Goto GestnErr
EndDialog = 0
Mesg = "Initialisation"
Begin Dialog DialgBox 144, 155, 333, 70, .GestionDialgImprs
OkButton 261, 8, 50, 14, .ctrOK
CancelButton 261, 36, 50, 14, .ctrCancel
GroupBox 2, 1, 193, 48, "Information Zone"
Text 8, 10, 181, 28, "" , .InforMesg
End Dialog
Dim DialgInstall As DialgBox
While (EndDialog = 0)
Dialog DialgInstall
WEND
GestnErr:
END SUB
Function GestionDialgImprs (IdObjet as string, _
Action as integer, _
Valeur as long) as integer
Select Case Action
Case 1 'Initialisation de la boîte de dialogue
dlgText dlgControlID("InforMesg"), Mesg
Case 2
Select Case DlgFocus
Case "ctrOK"
dlgText dlgControlID("InforMesg"), "First function"
'Call your first function, for example we will wait 5 seconds
Call Sleep (5000)
dlgText dlgControlID("InforMesg"), "Second function"
'Call your second function, for example we will wait 5 seconds
Call Sleep (5000)
dlgText dlgControlID("InforMesg"), "Third function"
'Call your third function, for example we will wait 5 seconds
Call Sleep (5000)
Mesg = "Functions completed"
End Select
End Select
End Function