Excel - Criterio busqueda pagina web

 
Vista:
sin imagen de perfil
Val: 37
Ha disminuido su posición en 6 puestos en Excel (en relación al último mes)
Gráfica de Excel

Criterio busqueda pagina web

Publicado por carlos (36 intervenciones) el 14/05/2020 15:58:24
Un saludo,

Intento saber cual es el nombre del critero para escribirlo en el codigo y que cuando ejecute la macro busque el numero de dossier que especifique:

Este es mi codigo:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Sub Rechercher_Web_Structure()
 
Dim ie As Object
 
Dim No_Structure As String
 
Set ie = CreateObject("InternetExplorer.Application")
 
ie.navigate "http://xxxxxxxxxxx"
 
Do Until ie.ReadyState = 4
 
DoEvents
 
Loop
 
Application.Wait (Now + TimeValue("0:00:01"))
 
No_Structure = "7103-18-0217"
 
With ie
 
.Document.getElementById("ctl00$cphContenu$txtNumeroDossier").Value = No_Structure
 
.Document.getElementById("ctl00$cphContenu$txtNumeroDossier").Click
 
.Visible = True
 
End With
 
End Sub
 
Estos son los criterios de la web
 
<!-- Première ligne de critètres --->
 
<tr >
 
<td style="width:16%"><span id="ctl00_cphContenu_lblNumeroDossier" class="fwkFieldLabel">No. de dossier</span></td>
 
<td style="width:22%" valign="top">
 
<table width="100%" cellpadding="0" cellspacing="0" >
 
<tr>
 
<td style="width:45%"><select name="ctl00$cphContenu$ddlTypeRecherche" id="ctl00_cphContenu_ddlTypeRecherche" style="font-size:X-Small;width:100%;">
 
<option value="DebutePar">D&#233;bute par</option>
 
<option selected="selected" value="Contient">Contient</option>
 
</select></td>
 
<td style="width:55%"><input name="ctl00$cphContenu$txtNumeroDossier" type="text" maxlength="12" id="ctl00_cphContenu_txtNumeroDossier" onkeydown="javascript:if((event.which &amp;&amp; event.which == 13) || (event.keyCode &amp;&amp; event.keyCode == 13)){document.getElementById(&#39;ctl00_cphContenu_btnRechercher&#39;).click();return false;}else return true;" style="width:90%;" /></td>
 
</tr>
 
</table>
 
</td>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder