View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Troels Forchhammer Troels Forchhammer is offline
external usenet poster
 
Posts: 1
Default Creating a VBA Range object from Excel HYPERLINK workbook function

I am trying to create a VBA macro that will chart some data points,
both measured data and limit data.

The measured data is listed in a range on another worksheet of the same
workbook that is hyperlinked using the workbook function 'HYPERLINK',
and I need to retrieve the contents of the hyperlink (which contains
full path and filename information) as a range object to pass on the
relevant columns to the chart, but I have not found an elegant way to
do this.

In a message from 1999, <news:en#jj3ni#GA.263@cppssbbsa03, Chip Pearson wrote that:

[...]
if you are using the =HYPERLINK() worksheet
function. In that case, use

TheAddress = Mid(Range("A1").Formula, 13, InStr(1,
Range("A1").Formula, ",") - 14)

to get the address of the hyperlink.


<http://groups.google.com/group/microsoft.public.excel.programming/msg/6fec646182dd90a4

I am, however, hoping that there is a more elegant solution available
than extracting the range information from the hyperlink in this way,
and I hope that you will be able to point me in the right direction.

--
Troels Forchhammer
TP -- Verification Services


The idea of being *paid* to govern is terribly
middle-class :-)
- Igenlode on AFH-P