ie.Navigate ('URL') ie.SetTextBox(username,'txtUserId',0) not sure but shouldn't you be waiting for navigate to actually finish loading the page before setting fields? see the ie.Busy or ie.readyState properties/methods