Bonsoir à tous,
J'ai fait le code suivant avec pour but de remplir automatiquement le champ d'un formulaire dans une page Internet explorer puis lancer un clic automatique du bouton "OK"
Mais je reçois le message d'erreur suivant : "Variable objet ou variable de bloc With non définie"
Voici mon code
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 Dim IE As InternetExplorer Dim IEDoc As HTMLDocument Dim InputPart As HTMLInputElement Dim GoBnt AS HTMLInputElement Set InputPart = IEDoc.all("part") 'j'attribue un contenu au champ InputPart.Value ="Texte" Set GoBnt = IEDoc.all("btn") 'j'exécute le submit GoBnt.click
NB: J'ai coché au préalable dans Outils/Références : "Microsoft HTML Object Library" et "Microsoft Internet Controls"
Merci
Partager