Is Option Explciit not working in your code as desired. Undeclared variables are not reported. Here is the fix to make Option Explicit to work as desired.
Login to Facebook, Twitter, Google+ in IE from Excel
Get VBA Code to automatically login into any of your online form or social media like Facebook, Linkedin, Twitter etc., It uses IE along with VBA automation