Open a PDF doc from Excel dash board

IannW

New Member
Joined
Aug 25, 2018
Messages
18
Hi All

Note to self, write your post in word and then copy to thiswindow, as I have now written the post 3 times, only for the window to crashand reopen without my text L.

Now to my question….
I have created a dash board using Excel and want to be ableto link to PDF docs in another folder. My PDF docs are all name as 4 numbers, ie, 0017.pdf, 0019.pdf and0276.pdf etc…
I want to be able to enter a 4 digit number into a cell andthen click a button next to it that then opens the PDF doc of the same name.
I have tried using a data validation cell using datanarrowed down using Power Query to remove the file extension but don’t know howto then open the selected file, and I didn’t really want to have to scrollthrough a list of around 500 numbers.
Any ideas gratefully appreciated.

IannW

 
I'm sorry but I don't understand your question regarding the formula. Can you please elaborate?
 
Upvote 0

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Crikeys! I guess I'm just a whole lot lazier'n ol' Domenic. :biggrin:I wouldn't've fussed with all dat VBA. I woulda just defined a named constant and used a formula...

Code:
=HYPERLINK("file:\\" & con.Path & TEXT(A1,"0000") & ".pdf","link")

where con.Path is a name defined to be the path. In my case it was:

Code:
="C:\Users\gtruby\Documents\Excel\VBA Lab\"

If'n ya reckon users are gonna have their hearts set on seein' a button, then just format the cell to look like a button. ;)

(Had to use the code tags otherwise the some of the backslashes kept disappearin'.)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,326
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top