Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a rake of files where the file name is in a spreadsheet column but the
file extension is not. There are only two possibilities .pdf or .tif. How do I get the bit marked ** to work?? I can get the filename from the worksheet by a loop Filename = Worksheets(SheetName).Cells(row_index, column_index).Value What I want to do then is vFile = filename & ".PDF" vPath = "http:\\amsds0004\chelmsford\ECR_metrics\" 'If the file exists with a PDF extension then ... ** If exists vPath + vFile then With Worksheets(SheetName) .Hyperlinks.Add .Cells(row_index, column_index), vFile End With 'Otherwise it must be a TIF extension so ... Else vFile = filename & ".TIF" With Worksheets(SheetName) .Hyperlinks.Add .Cells(row_index, column_index), vFile End With End if Thanks Paul |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
looking for a function that hopefully exist | Excel Worksheet Functions | |||
Exist or Not. | Excel Discussion (Misc queries) | |||
Am I Looking For Something That Doesn't Exist? | Excel Discussion (Misc queries) | |||
How to Display hyperlink addresses that already exist as links to | New Users to Excel | |||
does a file exist | Excel Discussion (Misc queries) |