PDA

View Full Version : VBA code to open up a page in IE and make some entries from excel into IE



rshnkmr39
09-26-2013, 12:54 PM
IE.Document.getelementbyid("departmentId").Value = Cells(y, 1).Value ' Enter Department from Excel

IE.Document.getelementbyid("classId").Value = Cells(y, 2).Value ' Enter Class from Excel



the page looks like this with a lookup box for both department and class.
lookup box when clicked shows all departments and one of it can be selected by clicking or entering the number also works..
same with the class field

Dept

059



Class


13




while typing manually when i enter 3 digits in the dept field the cursor automatically moves to the class field which needs to be entered..however while using the code to make the entry the class is not being entered(it is greyed out i.e. not selected)..is it because of the lookuptable or should the code be altered.


Thanks in advance

westconn1
12-24-2013, 03:52 AM
you may need to use fireevent for some property (possibly 'onchange') of the departmentid element
without seeing the source hard to guess