Solved

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

Posted on 2014-12-06
5
89 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 45

Accepted Solution

by:
Martin Liss earned 500 total points
Comment Utility
MsgBox Split(text1,text, """")(1)
0
 
LVL 45

Expert Comment

by:Martin Liss
Comment Utility
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
Comment Utility
@ Andreas Lazarou
-You want to retrieve the URL from a Visual Basic
textbox?
0
 
LVL 45

Expert Comment

by:Martin Liss
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

772 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

11 Experts available now in Live!

Get 1:1 Help Now