Solved

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

Posted on 2014-12-06
5
101 Views
Last Modified: 2015-01-04
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
0
Comment
Question by:Andreas Lazarou
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 47

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 40484694
MsgBox Split(text1,text, """")(1)
0
 
LVL 47

Expert Comment

by:Martin Liss
ID: 40484704
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

0
 
LVL 17

Expert Comment

by:vb_elmar
ID: 40486321
@ Andreas Lazarou
-You want to retrieve the URL from a Visual Basic
textbox?
0
 
LVL 47

Expert Comment

by:Martin Liss
ID: 40529987
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question