Results 1 to 2 of 2

Thread: Newb help

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2010
    Posts
    11

    Newb help

    Okay, so I just started using visual bsaic 2010. For my first project I am trying to build a web browser, i am using a tab control and all my buttons work on the original tab but once a make a new tab the buttons dont work

    here is the home button code i am using
    CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("http://www.google.com/search?q=" & TextBox2.Text)

    it comes up saying index 0 is out of range any help would be appreciated
    thanks

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Newb help

    Is there actually a webbrowser that has been added to the new tab?

    The most likely problem is just what it says: There is no item(0). Therefore, you have to figure out why not. If you think you created a webbrowser and added it to the tab...you didn't, so now you need to figure out where it went.
    My usual boring signature: Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width