Visual basic help

Posts 1–3 of 3 · Page 1 of 1
Visual basic help
My.Settings.History.Add(Browser.Url.ToString)
How come this is not freakin working? I have History as a System.Collections.Specialized.StringCollection and it says "Object reference not set to an instance of an object." What does this mean?
Quote Originally Posted by xFishx View Post
My.Settings.History.Add(Browser.Url.ToString)
How come this is not freakin working? I have History as a System.Collections.Specialized.StringCollection and it says "Object reference not set to an instance of an object." What does this mean?
Isn't there a Browser.Domain? or currentdocument or something like that you could use to get the url
Quote Originally Posted by xFishx View Post
My.Settings.History.Add(Browser.Url.ToString)
How come this is not freakin working? I have History as a System.Collections.Specialized.StringCollection and it says "Object reference not set to an instance of an object." What does this mean?
Did you ever actually instantiate your settings?

Put something like this in Form_Load:
Code:
If My.Settings.History Is Nothing Then
    My.Settings.History = New System.Collections.Specialized.StringCollection()
End If
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?