Dim OBJRETURN
Sub testavecIE()
'on lance le message
msgboxhtml "il est pas dans excel mon message ", "MESSAGE HORS EXCEL BY patricktoulon", Gif, OBJRETURN
' on ferme le message quand on veut avec
'OBJRETURN.Quit
End Sub
Function msgboxhtml(Message, titre, Gif, obj As Object) As Object
Dim objie As Object
Set objie = CreateObject("InternetExplorer.Application")
With objie
.Top = 100: .Left = 100: .Width = 300: .Height = 150
.AddressBar = False: .MenuBar = False: .StatusBar = False: .Toolbar = False: .Visible = True
.navigate2 "about:blank"
Do While .readyState <> 4: DoEvents: Loop 'attend la fin du chargement
code = "<html>|<head>| <title>|" & titre & "|</title>| </head>|<body >|<marquee><font color=red face=""algerian""> " & Message & _
"</font></marquee>|</body>|</html>"
code = Replace(code, "|", vbCrLf)
.document.write code
End With
Set obj = objie
Set objie = Nothing
End Function