In someones infinite wisdom they have asked me to program in VBA through an excel spreadsheet rather than let me code in VB.NET.
My boss wants me to show a hyper link to a file in an excel cell, only if the file exists...
I have found some code that will show a message box if the file exists or not (which works and shown below).
When I use the code Sub Test2 () on its own this also creates a hyper link,
But when i want to try and combine the codes this simply willl not work and throws me errors...
Any help would be greatfully received...
If Dir("c:\temp\debug.txt") <> "" Then
MsgBox "File exists"
MsgBox "File does not exist"
.Hyperlinks.Add Anchor:=Selection, Address:= _