I want my code so that if no tabstrip is selected the caption of the form is blank, or just 'StarSurfer v1.1 'or whatever. The code i have so far is:
VB Code:
Me.Caption = WebBrowser1(TabStrip1.SelectedItem.Tag).LocationName & " StarSurfer v1.1" End If
this doesnt work if no tab is selected, i get an error.
I've tried this code:
VB Code:
If TabStrip1.SelectedItem = Nothing Then Me.Caption = "Starsurfer v1.1" Else Me.Caption = WebBrowser1(TabStrip1.SelectedItem.Tag).LocationName & " StarSurfer v1.1" End If
but i get the error "invalid use of object"
anyone know what i should do??




Reply With Quote