Link to home
Start Free TrialLog in
Avatar of Andreas Lazarou
Andreas Lazarou

asked on

Get the URL from a textbox and display it as a msgbox

I need to retrieve the URL from the textbox.

The textbox have value = "Some text here ....<a href="http://google.com">Google</a> ... some other text here"

How can i get only http://google.com in a msgbox?

Thank you
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Another way.
Dim intStart As Integer
Dim intEnd As Integer

intStart = InStr(1, text1.text, "<a href=")
intEnd = InStr(intStart, text1.text, ">")

MsgBox Mid(text1.text, intStart + 8, intEnd - intStart - 8)

Open in new window

@ Andreas Lazarou
-You want to retrieve the URL from a Visual Basic
textbox?
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.