I am trying to open an excel file using the following code.
tmplotno is a string
The file will open fine if I type the entire path in however; the folder and filenames will be variable.
I get the error '490' - Cannot open the specified file.
I am using the exact same code to open a .pdf and a .jpg file and they work perfectly.
Help would be greatly appreciated.
Code:
lblLotPlan.HyperlinkAddress = ""
lblLotPlan.HyperlinkAddress = ("Old Cemetary\" & "Lot " & tmplotno & ".xls")
Application.FollowHyperlink lblLotPlan.HyperlinkAddress
The file will open fine if I type the entire path in however; the folder and filenames will be variable.
I get the error '490' - Cannot open the specified file.
I am using the exact same code to open a .pdf and a .jpg file and they work perfectly.
Help would be greatly appreciated.
