Thanks for the help. But I'm getting type mismatch debug message. What may be the reason for this?
Here is the code lines above the line which I had posted previously
Dim ie As Object, oDoc As Object
Dim ieForm As Variant
Dim WebPage As String
Any help would be kindly appreciated.