Solved

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

Posted on 2014-12-06
5
91 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
  • 3
5 Comments
 
LVL 46

Accepted Solution

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

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 46

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…

929 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now