[VBA] Ouvrir un fichier html
Le
HD

Bonjour,
Avec mon vieux Excel 97 sur Windows 98 j'ouvrais les fichiers html via la
commande
ret = Shell("start c:MonRepertoireMonFichier.htm")
Mais avec Excel 2007 sous Windows XP celà ne passe pas because: "Erreur
53 : fichier introuvable". Le fichier introuvable en question doit être le
"start" car le chemin du fichier html est le bon. Le "problème" vient il
d'Excel 2007 ou de Windows XP ?
Savez quel est la commande pour ouvrir un tel fichier ?
Merci d'avance pour votre aide.
@+
HD
Avec mon vieux Excel 97 sur Windows 98 j'ouvrais les fichiers html via la
commande
ret = Shell("start c:MonRepertoireMonFichier.htm")
Mais avec Excel 2007 sous Windows XP celà ne passe pas because: "Erreur
53 : fichier introuvable". Le fichier introuvable en question doit être le
"start" car le chemin du fichier html est le bon. Le "problème" vient il
d'Excel 2007 ou de Windows XP ?
Savez quel est la commande pour ouvrir un tel fichier ?
Merci d'avance pour votre aide.
@+
HD
Comme cela
Private Declare Function ShellExecute Lib "shell32.dll" Alias _
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal _
lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As _
String, ByVal nShowCmd As Long) As Long
Private Const SW_SHOWNORMAL As Long = 1
Sub LanceNavigateur()
Dim s As String
s = "c:MonRepertoireMonFichier.htm"
ShellExecute hwnd, "open", s, vbNullString, vbNullString, SW_SHOWNORMAL
End Sub
Daniel
--
VBAXL
http://dj.joss.free.fr/
FAQ MPFE
FAQ du forum microsoft.public.fr.excel
http://dj.joss.free.fr/faq.htm
"HD" f5qg35$b6n$