Visual Basic Development Bookmark and Share   
 Home > Visual Basic Interop and Upgrade > CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate(My.Settings.homepage.ToString)
 

CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate(My.Settings.homepage.ToString)

This gives me an error.

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate(My.Settings.homepage.ToString)

End sub

It says that "System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object.""

I have a value in for the setting, it is http://acedrive.tk/

<?xml version="1.0" encoding="utf-16"?>
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<string>&lt;http://acedrive.tk&gt;</string>
</ArrayOfString>

What's the issue?


ZERGVB  Wednesday, November 18, 2009 10:19 PM
Please enter break mode and use Watch window to check which variable is null in this scenario. Have a look at the following link about how to use the QuickWatch Dialog Box:
http://msdn.microsoft.com/en-us/library/cyzbs7s2.aspx

Best regards,
Riquel
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Riquel_Dong  Monday, November 23, 2009 9:58 AM
Please enter break mode and use Watch window to check which variable is null in this scenario. Have a look at the following link about how to use the QuickWatch Dialog Box:
http://msdn.microsoft.com/en-us/library/cyzbs7s2.aspx

Best regards,
Riquel
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Riquel_Dong  Monday, November 23, 2009 9:58 AM

You can use google to search for other answers

Custom Search

More Threads

• BUG: Excel interop -- persistence of Process after close/release
• CreateControl Office/Access automation through Interop
• Creating Data Base with XAMPP
• Excel Interop Range.Autofit generates error 2146827284
• Windows API calls to call Javascript
• Adding .NET exe to ROT
• Converting VB6 libraries of functions
• "...Upgrade Support Threw an Exception" - I'm about to throw a wrench at it
• Unable to find entry point?
• Setting the caption of the VB6 form from within a user control