Opening PDF & JPG files with USERFORM VBA

dellehurley

Board Regular
Joined
Sep 26, 2009
Messages
171
Office Version
  1. 365
Platform
  1. Windows
Hi
I have googled my heart out over the last couple of days and tried 100's of different things but nothing is working so I am hoping one of you fine people can help.

I have created a Database with a user form. I need to be able to open the files which names I have pointed out on the left hand side. All the files are all PDF and Jpg files. They are all located in the one folder the same folder where this database is located. New files are always being added.
The combobox pointed to on the right (cmbFileCode) does not need to be there and maybe not the command button names Open File either, if you can make it work without it.
Currently the combobox (cmbFileCode) is dynamic and updates as the database is added to from the info on Worksheet2 (Database)

The file can be found here Link to Database File via Drop Box
Thanks Dannielle
My apologise if my code is messy - I'm a newbie.
Publication1.jpg
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hi,
Yes I would like to open them externally and the folders address is
C:\Users\delle\OneDrive\Documents\Genealogy\!Family Tree Files and Photos!\
If it is an issue being in OneDrive I can move it and back it up another way.
Thanks
 
Upvote 0
Thanks for your interest and offering to help but I have managed to sort it out.
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,151
Members
453,021
Latest member
Justyna P

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