Private Sub UserForm_Activate()
Caption = Space(28) & Application.Proper(Format(Now, "dddd dd mmmm yyyy")) & " - il est : " & Format(Now, "hh:mm")
CommandButton2.SetFocus
affiche_image WebBrowser1, "D:\temp\porte de sortie.gif"
affiche_image WebBrowser2, "D:\temp\ligne_filante_21.gif"
End Sub
Private Sub affiche_image(wb As Object, FichierImG)
Dim images As Object, img As Object
With wb
.Navigate FichierImG
Do While .ReadyState < 4: DoEvents: Loop 'navigate complete
With .Document.Body
.Scroll = "no"
.TopMargin = "0"
.BottomMargin = "0"
.LeftMargin = "0"
.RightMargin = "0"
.Style.Border = "none"
Set img = .all(0)
img.Style.Height = "100%"
img.Style.Width = "100%"
End With
End With
End Sub