Private Sub UserForm_Activate()
ARRET = False
Debut = Now
Fin = Debut + DUREE / 86400
With UserForm1.Label1
.Caption = PREFIXE & Format(Fin - Now, "hh:mm:ss")
.BackColor = Me.BackColor
End With
Call Rebours
End Sub
Private Sub UserForm_Initialize()
Dim SP As Object
With Me
.Top = 0
.Left = 0
.Height = 400
.Width = 600
End With
With Me.Label1
.Top = 350
.Left = 12
.Height = 10
.Width = 100
End With
'--- Pour illustration, un contrôle SpreadSheet est créé ---
Set SP = Me.Controls.Add("owc11.Spreadsheet.11")
ThisWorkbook.Sheets(1).Cells.Copy
With SP
.Top = 20
.Left = 20
.Height = 300
.Width = 560
End With
SP.Sheets(1).Cells.Paste
SP.Sheets(1).[a1].Select
Application.CutCopyMode = False
'-------------------------------------------------------------
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
ARRET = True
Unload Me
End Sub