Microsoft Visual Basic 2010 Express syntax error
35 minutes ago, Joshuabishop4 said:Could you fix the code or not? The program is called Web Browser (case sensitive)
Hi!
I just happened to have this discussion open in a tab. On this forum, you need to quote a user if you want them to reply to you. If you don't they don't get a notification that you asked something. To quote, click the arrow button below a comment.
Change the first line back to
Public Class Form1
Here you're declaring a Class, not the program. Form1 is fine for that.
Then change the third line to
WebBrowser1.Navigate(TextBox1.Text)
This is important! This only works if you didn't change the name values for the WebBrowser and TextBox from their defaults. If you did, you need to replace WebBrowser1 and TextBox1 with what you got there.
So finally, here's my suggestion for your complete code
Public Class Form1
Private Sub Go_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.Navigate(TextBox1.Text)
End Sub
End Class
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now