Bonjour à tous,

Je veux charger du code javaScript dans l'objet webBrowser (ici wbGeoLoc) sans utiliser un fichier html.
J'ai donc essayé la méthode Navigate avec une variable chaîne de caractères comme ci-dessous mais ça génère une erreur d'exécution:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 
'Init Variable string. Double les doubles quottes sinon erreur de compil 
 
sHtmlCode = " <!-- saved from url=(0016)http://localhost --> " & _
" <!DOCTYPE html ""-//W3C//DTD XHTML 1.0 Strict//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd""> " & _
" <html xmlns=""http://www.w3.org/1999/xhtml"" style=""overflow:hidden;""> " & _
" <head> " & _
" <meta http-equiv=""content-type"" content=""text/html; charset=UTF-8""/> " & _
" <title>Google Map</title> " & _
" <style type=""text/css""> " & _
" body { height: 100%; margin: 0px; padding: 0px; overflow: hidden } " & _
"    #map { height: 100% } " & _
" </style> " & _
" <script type=""text/javascript"" src=""http://maps.google.com/maps/api/js?sensor=false""></script> " & _
" <script type=""text/javascript""> "
 
Me.wbGeoLoc.Navigate sHtmlCode
Quelqu'un à une solution.

Merci à tous de votre aide