Hi Everybody.
i am industrial engineer and having some little problem about the code: what's wrong with it?
>>> use code - tags <<<
------------------------------------------------------------------------------------------
drowndown menu comes default as "Choose " but i want to change it TO AFTERNOON by VBA CODE
drowndown menu can not select the value "Afternoon", Why???
here is the some important parts of HTML CODES:
i will really appreciate and will be gratefull for your help
i am industrial engineer and having some little problem about the code: what's wrong with it?
>>> use code - tags <<<
Code:
Sub ef()
Dim IE As InternetExplorer, tmpUrl As String
Set IE = New InternetExplorerMedium
IE.Visible = True
tmpUrl = "https://daytime.intra/ng/ngLogin.faces"
IE.Navigate tmpUrl
Do While IE.Busy
DoEvents
Loop
Do While Not IE.ReadyState = 4: DoEvents: Loop
IE.Document.getElementsByName("form1:textusername")(0).Value = "George"
IE.Document.getElementsByName("form1:password")(0).Value = "123456"
IE.Document.getElementById("form1:btnLogin").Click
' EVERYTHING IS OK until here, it automatically clicks the button at last and new page opens where dropdown menu is out of control of me!
PROBLEM STARTS AFTER THIS:
Do While Not IE.ReadyState = 4: DoEvents: Loop
IE.Document.getElementById("form2:menuSistem").Focus
'IE.Document.getElementById("form2:menuSistem").Value = "Afternoon"
Do While Not IE.ReadyState = 4: DoEvents: Loop
End Sub
drowndown menu comes default as "Choose " but i want to change it TO AFTERNOON by VBA CODE
drowndown menu can not select the value "Afternoon", Why???
here is the some important parts of HTML CODES:
Code:
}
function func_logout() {
inFormOrLink = true;
document.getElementById('form2').target = '_top';
document.getElementById('form2:hiddenSistemURL').value = 'LOGOUT';
document.getElementById('form2:menuSistem').value = '1';
customWindow('_top','/sso/Logout.faces', 'K');
}
<TD width="234px" height="25px" bgcolor="#F4F4F4" align="left" valign="bottom"><select id="form2:menuSistem" name="form2:menuSistem" size="1" onchange="func_1('form2:menuSistem')" class="selectOneMenu"> <option value="0">Choose</option> <option value="62">Morning</option> <option value="44">Afternoon</option> <option value="19">Night</option></select></TD>
i will really appreciate and will be gratefull for your help
Last edited by a moderator: