problème utilisation WebBrowser1

alainah

XLDnaute Nouveau
Bonjour,
lorsque j'utilise WebBrowser1 dans le code VBA j'ai l'erreur suivante :
erreur de compilation
variable non définie

il me manque sans doute une référence dans mes outils, pouvez-vous m'aider ?

Cordialement
Alain
 

alainah

XLDnaute Nouveau
Re : problème utilisation WebBrowser1

bonjour,
ci joint le code vba, il fonctionne sur un autre pc dont je n'ai pas l'acces.

Option Explicit
Dim pausetime, start, valeur
Private Declare Function FindWindowA Lib "User32" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLongA Lib "User32" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLongA Lib "User32" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Dim strFormClassName As String

Private Sub UserForm_Initialize()
Dim hWnd As Long, exLong As Long, zFactor As Integer
hWnd = FindWindowA(vbNullString, Me.Caption)
exLong = GetWindowLongA(hWnd, -16)
If exLong And &H880000 Then SetWindowLongA hWnd, -16, exLong And &HFF77FFFF
zFactor = 120 * CInt(Application.Width / Me.Width)
If zFactor > 400 Then zFactor = 400
Me.Width = Application.Width
Me.Height = Application.Height
Me.Zoom = zFactor
Dim gif As String

WebBrowser1.Navigate _
"about:<html><center><body scroll='no' Bgcolor= #404040 BottomMargin=0 LeftMargin=0 TopMargin=0 RigthMargin=0>" & _
"<img src='D:\AH INFORMATIQUE\content.gif' width='100%' height='100%'></img></center></body></html>"

WebBrowser2.Navigate _
"about:<html><center><body scroll='no' border=0 Bgcolor= #404040 BottomMargin=0 LeftMargin=0 TopMargin=0 RigthMargin=0 >" & _
"<img src='D:\AH INFORMATIQUE\colere.gif' width='100%' height='100%' ></img></center></body></html>"

TxtCalculDizaines.Value = ""
BandeauCentaine.Visible = False
WebBrowser2.Visible = False
LabelErreur.Visible = False
LabelRetenue.Visible = False
FrameOK.Visible = True


End Sub

cordialement
alain
 

Discussions similaires

Réponses
1
Affichages
145
Réponses
9
Affichages
265

Statistiques des forums

Discussions
312 775
Messages
2 092 025
Membres
105 153
dernier inscrit
cocf