Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Excel VBA question

Posted on 2002-03-20
7
Medium Priority
?
166 Views
Last Modified: 2012-05-04
Ok.  I have a column full of hyperlinks in Excel.

I need to find out how to seperate the 'text' from the 'link'

Please help!!!
0
Comment
Question by:AAMFK
[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
7 Comments
 
LVL 18

Expert Comment

by:bobbit31
ID: 6883837
don't really understand:

    Dim url As String
   
    url = Sheet1.Cells(1, 1) '' this is a hyperlink
    MsgBox url

all i get is text what do you mean by the 'link'
0
 
LVL 4

Expert Comment

by:wileecoy
ID: 6883851


Ok - try this - this is with the 'Selection'.  You can also use it with the 'Worksheet'.


Dim h As Hyperlink

For Each h In Selection.Hyperlinks
    MsgBox h.Name
    MsgBox h.Address
Next


HTH,

Wileecoy.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6883854
Hearing for further details...
0
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!

 
LVL 44

Accepted Solution

by:
bruintje earned 400 total points
ID: 6884092
Hey thanks Wileecoy, that's what i was after ;) i used it with the worksheet object but didn't look for a narrower thing with the selection you can use it in a range and do something like

i=1
Range("A1:A20000").select
For Each h In Selection.Hyperlinks
   Range("B" & i).value= h.Name
   Range("C" & i).value= h.Address
   i=i+1
Next

going through the worksheet took to much time with 16000 hyperlinks and only half of them relevant

:O)Bruintje

PS not meant as comment to this question
0
 
LVL 4

Expert Comment

by:wileecoy
ID: 6885734
Any progress AAMFK?
0
 
LVL 1

Author Comment

by:AAMFK
ID: 7207890
uh i ended up saving it as a HTML and parsing--

but ill award these points thanks
0
 
LVL 44

Expert Comment

by:bruintje
ID: 7210856
wileecoy, since an accepted answer can't be reversed i'll post a seperate Q for you here

http://www.experts-exchange.com/visualbasic/Q_20334794.html

:O)Bruintje
0

Featured Post

Independent Software Vendors: 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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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…
Suggested Courses

636 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