IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Macros et VBA Excel Discussion :

Internet IE et VBA


Sujet :

Macros et VBA Excel

Mode arborescent

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé
    Profil pro
    Inscrit en
    Décembre 2010
    Messages
    190
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2010
    Messages : 190
    Par défaut Internet IE et VBA
    Bonjour,

    J'aimerai controler une page IE avec VBA.
    Vous trouverez en pièce jointe une image des champs que j'aimerai éditer.
    J'aimerai pouvoir éditer chacun des champs.

    Pourriez-vous m'aider avec la synthaxe svp?

    Voici ce que je pensais utiliser:


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     IEDoc.getElementsByTagName("valPropFrom").Value = "test"
     IEDoc.getElementsByTagName("valCIN").Value = "test"
     IEDoc.getElementsByTagName("txtPeriodTo").Value = "test"
     IEDoc.getElementsByTagName("txtPropFrom").Value = "test"
    Mais cela ne fonctionne pas (Erreur 91 ou 438).


    Voici la partie de code de la page en question.

    Code html : 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
    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
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
            <table id="tblQuery">
                <tr>
                    <td>
                        <!-- Call type section -->
                        <fieldset>
                            <legend>
                                Call Type
                            </legend>
                            <div>
                                <input id="chkInbound" type="checkbox" name="chkInbound" checked="checked" /><label for="chkInbound">Inbound</label>
                            </div>
                            <div>
                                <input id="chkOutbound" type="checkbox" name="chkOutbound" checked="checked" /><label for="chkOutbound">Outbound</label>
                            </div>
                        </fieldset>
                    </td>
                    <td>
                        <!-- Call properties section -->
                        <fieldset>
                            <legend>
                                Call Properties
                            </legend>
                            <div class="pad">
                                <span class="fieldLabel">From</span>
                                <input name="txtPropFrom" type="text" id="txtPropFrom" />
     
                                <span id="valPropFrom" style="display:none;"></span>
                            </div>
                            <div>
                                <span class="fieldLabel">To</span>
                                <input name="txtPropTo" type="text" id="txtPropTo" />
                                <span id="valPropTo" style="display:none;"></span>
                            </div>
                        </fieldset>
                    </td>
                </tr>
                <tr>
                    <td>
                        <!-- Call period section -->
                        <fieldset>
                            <legend>
                                Call Period
                            </legend>
                            <div class="pad">
                                <span class="fieldLabel">From</span>
                                <input name="txtPeriodFrom" type="text" id="txtPeriodFrom" />
                                <input type="hidden" name="HiddenFieldFrom" id="HiddenFieldFrom" />                            
                                <span id="ctl12" style="display:none;"></span>
                            </div>
                            <div>
                                <span class="fieldLabel">To</span>
                                <input name="txtPeriodTo" type="text" id="txtPeriodTo" />
                                <input type="hidden" name="HiddenFieldTo" id="HiddenFieldTo" />
                                <span id="ctl14" style="display:none;"></span>
                            </div>
                        </fieldset>
                    </td>
                    <td>
                        <!-- Call duration section -->
                        <fieldset>
                            <legend>
                                Duration
                            </legend>
                            <select name="ddlDurationOperator" id="ddlDurationOperator">
    	<option value="gte">&gt;=</option>
    	<option value="lte">&lt;=</option>
     
    </select>
                            <input name="txtDurationValue" type="text" id="txtDurationValue" style="width:64px;" />
                            <span id="ctl16" style="display:none;"></span>
                            <select name="ddlDurationUnit" id="ddlDurationUnit">
    	<option value="m">minutes</option>
    	<option value="s">seconds</option>
     
    </select>
                        </fieldset>
                    </td>
                </tr>
                <tr>
                    <td>
                        <!-- Agent section -->
                        <fieldset>
                            <legend>
                                Agent
                            </legend>
                            <span class="fieldLabel">Handled by</span>
                            <select name="ddlAgentName" id="ddlAgentName" style="width:160px;">
    	<option value="">(None)</option>
    	<option value="COY1">COY1</option>
    	<option value="CPY1">CPY1</option>
    	<option value="DXM1">DXM1</option>
    	<option value="DYY1">DYY1</option>
    	<option value="ECI1">ECI1</option>
    	<option value="EFL1">EFL1</option>
    	<option value="EIL1">EIL1</option>
    	<option value="EJH1">EJH1</option>
    	<option value="EJM1">EJM1</option>
    	<option value="EKV1">EKV1</option>
    	<option value="ELW1">ELW1</option>
    	<option value="EPJ1">EPJ1</option>
    	<option value="GH73">GH73</option>
    	<option value="L001">L001</option>
    	<option value="MPD1">MPD1</option>
    	<option value="X4V1">X4V1</option>
     
    </select>
                        </fieldset>
                    </td>
                    <td>
                        <!-- Extended properties section -->
                        <fieldset>
                            <legend>
                                Extended Properties
                            </legend>
                            <div class="left fieldLabel">
                                <span>CIN</span>
                            </div>
                            <div class="left">
                                <div>
                                    <input name="txtCIN" type="text" maxlength="20" id="txtCIN" style="width:150px;" />
                                    <span id="valCIN" style="display:none;"></span>
                                </div>
                                <div>
                                    <input id="chkValidatedOnly" type="checkbox" name="chkValidatedOnly" /><label for="chkValidatedOnly">Validated CIN only</label>
                                </div>
                            </div>
                        </fieldset>
                    </td>
                </tr>
                <tr>
                    <!-- Search button and validation messages -->
                    <td colspan="2">
                        <a onclick="showWaitMsg();" id="lbtSearch" class="stdButton" href="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;lbtSearch&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, true))">Search</a>
                        <span id="pnlWait" style="display: none">
                            <img src="Resources/Images/ajax-load-black.gif" />
                            Searching, please wait...
                        </span>
     
                    </td>
                </tr>
            </table>
     
            <hr />
     
            <div id="upRecordings">
     
     
     
     
    </div>
    Images attachées Images attachées  

Discussions similaires

  1. [Article] Manipulation d'Internet Explorer via VBA
    Par Qwazerty dans le forum Contribuez
    Réponses: 116
    Dernier message: 13/02/2020, 15h47
  2. probleme Manipulation d'Internet Explorer via VBA
    Par casefayere dans le forum Macros et VBA Excel
    Réponses: 5
    Dernier message: 05/03/2012, 20h36
  3. Tutoriel pour Internet Explorer en VBA
    Par Patnel dans le forum Général VBA
    Réponses: 6
    Dernier message: 30/11/2009, 15h29
  4. Souci dans le pilotage d'internet explorer avec vba
    Par alyjeje dans le forum VB 6 et antérieur
    Réponses: 7
    Dernier message: 03/08/2009, 17h22

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo