• Log in or sign up for an account here: https://www.sythe.org/login

connect to website via txt box

damien121

Forum Addict
Joined
May 3, 2007
Sythe Gold
0
Messages
489
Location
Yanille =D
Hello,
i am new to visual basic but know just a few things.
Right now i am wondering....

i know how to connect to a website via commandbutton.
This code works:
CODEPrivate Sub Command1_Click()
WebBrowser1.Navigate "www.solidrune.com"
End Sub

And i want to know how it would connect to the website they have typed in a certain textbox.

someone said this...


QUOTE
Well instead of typing the url type text1.text (which is what you should name it before doing it)
eg:
Private Sub Command1_Click()
WebBrowser1.Navigate "text1.text"
End Sub
And it then connects to the website address from text1!
happy coding.


i have done this several times.
But when they type url in textbox 1 and press the command button it just says page cannot be displayed.

Please help me out.
Thanks

Origianally posted at: http://cruels.net/index.php?showtopic=5676
 
Do you want it to connect straight away when the URL is in it, or connect after you click the button?
 
never mind :s i done it. instead of "Text1.text it was text1.text :s my mistake im really sorry guys
 
Edit your post next time. And its not hard.


Command1_Click()
Webbrowser1.navigate Text1.text
End Sub


Easy.. :P
 
UWotM8?
You only quote something when you want that exact text to show. IF you want the text from text1.text then you would use

Private Sub Command1_Click()
WebBrowser1.Navigate text1.text
End Sub

if you wanted a specific url it would be

Private Sub Command1_Click()
WebBrowser1.Navigate "www.url.here"
End Sub
 
Runescape Gamblingrunescape gambling
Back
Top