Problems generating an html link based on worksheet values - SOLN

Problems generating an html link based on worksheet values - SOLN

Post by Frederik Roman » Wed, 02 Jul 2003 22:34:17



Hello Peop's,

I am sorry, the fault was in the data not the program.

The file
        \\FDR-server\General Pool\Beatrix\DATA SHEETS\FDR_PDF\4383 DAT 01.pdf

does not physically exist (due to a time lag in capturing data sheets
in our asset management system).

Both macros work fine - so there you all go, spoilt for free choice.
Fred.

 
 
 

Problems generating an html link based on worksheet values - SOLN

Post by Tom Ogilv » Wed, 02 Jul 2003 23:12:03


Have you looked at the hyperlink worksheet function?

Regards,
Tom Ogilvy


Quote:> Hello Peop's,

> I am sorry, the fault was in the data not the program.

> The file
> \\FDR-server\General Pool\Beatrix\DATA SHEETS\FDR_PDF\4383 DAT 01.pdf

> does not physically exist (due to a time lag in capturing data sheets
> in our asset management system).

> Both macros work fine - so there you all go, spoilt for free choice.
> Fred.


 
 
 

1. Problems generating an html link based on worksheet values

I want to generate a hyper link based on text in a cell, for example
the cells D16 and D17 generate the text strings in F16 and F17, which
are valid filenames.  I have two macros
        MakeLink_file
        MakeLink_datNum
that should both generate hyperlinks for me (source for these below),
however MakeLink_file does not work, whereas MakeLink_datNum does (I
want to use the more generic MakeLink_file version).  Any ideas why
the simpler macro does not work?

Fred

D16 = 4383
D17 = 1267

F16 = \\FDR-server\General Pool\Beatrix\DATA SHEETS\FDR_PDF\4383 DAT
01.pdf
F17 = \\FDR-server\General Pool\Beatrix\DATA SHEETS\FDR_PDF\1267 DAT
01.pdf

This hyperlink does not work
E16 = MakeLink_file(F16)
= \\FDR-server\General Pool\Beatrix\DATA SHEETS\FDR_PDF\4383 DAT
01.pdf

This hyperlink does work
E17 =MakeLink_datNum(D17)
= \\FDR-server\General Pool\Beatrix\DATA SHEETS\FDR_PDF\1267 DAT
01.pdf

Public Function MakeLink_datNum( datNum)
'
' Macro recorded 2003-07-01 by Fred

        MakeLink_datNum = "\\FDR-server\General Pool\Beatrix\DATA
SHEETS\FDR_PDF\" _
    &   datNum _
    &   " DAT 01.pdf"

    ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:=
MakeLink_datNum

    Selection.Font.ColorIndex = 0

End Function

Public Function MakeLink_file( file)
'
' Macro recorded 2003-07-01 by Fred

    MakeLink_file = file
    ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= file
    Selection.Font.ColorIndex = 0

End Function

2. DataGrid not using DataColumn.Caption's

3. &&Excel Macro&& How to retrive selected values based on another worksheet

4. Access denied - file may be in use question

5. Problem e-mailing HTML pages generated by SAS programs via broker.exe

6. Is there a ppp driver for Windows NT

7. problem with back button in browser after generating HTML

8. Return a value based on values in two other columns.

9. 123 - How to color values in a column based on value

10. How to create script to dynamically click on HTML links in HTML tables ?

11. HTML tabs( which are links) show up as HTML Heading

12. How to add value to variable based on certain value??