Hyper link open folder

psamu

Active Member
Joined
Jan 3, 2007
Messages
462
I have a hyperlink field. In my form I added a text box. Now for adding a link user has to right click and add in order to add a file path. How do I add click event opens a folder when user can select the folder and file name to add he/she wants . Thanks
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
You can call the file picker or file folder dialog with your own function or a macro. See if this helps, or research MS Access file picker VBA or MS Access folder picker VBA. Which one you choose depends on whether you want to drill down to a folder or file. You don't need to consider solutions for MSDN applications. It's quite easy, actually. Here's a couple of references to get you started.
How to show "Open File" Dialog in Access 2007 VBA? - Stack Overflow

[url]http://bytes.com/topic/access/insights/916710-select-file-folder-using-filedialog-object

[/URL]
 
Upvote 0
Thanks. I have in my table Hyperlink field. Every time user click file folder open and click on a file to create a link and it should update in the field. This works, but it is jus for a link, does not update to the field.
 
Upvote 0
I would avoid using the hyperlink data type for this (or at all). It makes thing very difficult.

Here are some working examples I created to do what you:

Document Links (Click Here)

This is a basic example of how to store the path to a file and also be able to view the file. You can browse using the standards windows common dialog to select the file. You can view the file using the application defined with the Windows File Associations. It uses the ShelExec API to open the file. It does not use the .Followhyperlink method.

This example is a continuous form that could easily be used as a sub form to attach multiple documents to a record.


Document Links 2 (Click Here)


This is an update to the basic example of how to store the path to a file and also be able to view the file. You can browse using the standards windows common dialog to select the file. You can view the file using the application defined with the Windows File Associations. It uses the ShelExec API to open the file. It does not use the .Followhyperlink method.
This example is a continuous form that could easily be used as a sub form to attach multiple documents to a record.
***** Because it doesn't use the hyperlink data type, this new version stores the path in a way that allows the folder to be easily moved.
 
Upvote 0

Forum statistics

Threads
1,221,842
Messages
6,162,333
Members
451,759
Latest member
damav78

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