Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming,comp.apps.spreadsheets,microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Add link to specific Excel worksheet in HTML Outlook message | Links and Linking in Excel | |||
Documents move is generating link errors in Excel | Excel Discussion (Misc queries) | |||
Problems Creating html files with excel sheet | Excel Discussion (Misc queries) | |||
Link based on worksheet name? | Excel Worksheet Functions | |||
Generating a Userform based on a worksheet | Excel Discussion (Misc queries) |