i'm having problems getting the source code of a site that i navigated to with the webbrowser

i get this error "Object reference not set to an instance of an object."

on this line F.txtSource.Text = GetCurrentWebDoc.documentElement.outerHTML