How can I create a button on an Access form that will open a browse for file dialog?
I then need the chosen file path to be inserted into a hyperlink field.
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Create a button to browse for files
Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Create a button to browse for files
- This topic has 5 replies, 5 voices, and was last updated 24 years, 4 months ago.
AuthorTopicViewing 2 reply threadsAuthorReplies-
WScharlotte
AskWoody Lounger -
WSkbelesky
AskWoody LoungerJanuary 9, 2001 at 5:10 pm #509809Private Sub Command0_Click() ' 'I would not consider this to be "easy", so Charlotte's comment is valid. But here's ' a way to do it. 'You need a reference set to Excel for this to work. ' Dim xl As Excel.Application Dim str ' 'A new instance of excel will open ' Set xl = New Excel.Application ' 'It has to be visible for the Dialogue to appear ' xl.Visible = True ' 'Excel's GetOpenFilename method returns a string of the path and file name you select. ' If you do not select a file, it returns "False" ' str = xl.GetOpenFilename() MsgBox str ' 'Be sure to quit excel or it will continue to run in the background. ' xl.Quit Set xl = Nothing ' 'Hope this helps! ' End Sub
-
WScharlotte
AskWoody Lounger
-
-
-
WSTexasTJ
AskWoody LoungerJanuary 9, 2001 at 5:43 pm #509816http://www.mvps.org/access/api/api0001.htm
Code courtesy of:’ Microsoft Access 95 How-To’ Ken Getz and Paul Litwin
‘ Waite Group Press, 1996It has code for an API call that has, thus far, worked great for my application.
Good luck.
-
Andrew Lockton
AskWoody_MVPJanuary 10, 2001 at 2:52 am #509850Edited by charlotte on 01/01/10 03:52.
I changed your addresses to hyperlinks. Click on!–Charlotte
I also agree with Charlotte’s not easy comment. The most useful demonstration I have seen is in a Candace Tripp demo database called Backup Database (130Kb download) at ftp://www.athree.com/pub/candace/candace/backup/bkup2.zip%5B/url%5D – Access2 version
ftp://www.athree.com/pub/candace/candace/backup/bkup97.zip%5B/url%5D – Access97 versionThere is a whole lot more than what you are requiring but it can be built from selected components in that file.
Have a look at the site where it all sits for all sorts of useful downloads
http://www.candace-tripp.com/_pages/HTML/default_HTML.htm%5B/url%5DThe hyperlinking is a simple one liner once you have the string containing the path to the file. An example is shown below
Me.lblFldr.HyperlinkAddress = PthNam
where Me.lblFldr is the name of the control which is hyperlinked and PthNam is the string to it.
Viewing 2 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Mozilla Firefox Security Updates! Released late 17th May 2025
by
Alex5723
4 hours, 40 minutes ago -
Microsoft: Troubleshoot problems updating Windows
by
Alex5723
1 hour, 33 minutes ago -
Woman Files for Divorce After ChatGPT “Reads” Husband’s Coffee Cup
by
Alex5723
8 hours, 39 minutes ago -
Moving fwd, Win 11 Pro,, which is best? Lenovo refurb
by
Deo
2 hours, 5 minutes ago -
DBOS Advanced Network Analysis
by
Kathy Stevens
18 hours, 28 minutes ago -
Microsoft Edge Launching Automatically?
by
healeyinpa
8 hours, 53 minutes ago -
Google Chrome to block admin-level browser launches for better security
by
Alex5723
21 hours, 9 minutes ago -
iPhone SE2 Stolen Device Protection
by
Rick Corbett
13 hours, 24 minutes ago -
Some advice for managing my wireless internet gateway
by
LHiggins
9 hours, 5 minutes ago -
NO POWER IN KEYBOARD OR MOUSE
by
HE48AEEXX77WEN4Edbtm
15 hours, 21 minutes ago -
A CVE-MITRE-CISA-CNA Extravaganza
by
Nibbled To Death By Ducks
1 day, 6 hours ago -
Sometimes I wonder about these bots
by
Susan Bradley
1 day, 2 hours ago -
Does windows update component store “self heal”?
by
Mike Cross
16 hours, 58 minutes ago -
Windows 11 Insider Preview build 27858 released to Canary
by
joep517
1 day, 20 hours ago -
Pwn2Own Berlin 2025: Day One Results
by
Alex5723
4 hours, 32 minutes ago -
Windows 10 might repeatedly display the BitLocker recovery screen at startup
by
Susan Bradley
8 hours, 13 minutes ago -
Windows 11 Insider Preview Build 22631.5409 (23H2) released to Release Preview
by
joep517
1 day, 23 hours ago -
Windows 10 Build 19045.5912 (22H2) to Release Preview Channel
by
joep517
1 day, 23 hours ago -
Kevin Beaumont on Microsoft Recall
by
Susan Bradley
1 day, 11 hours ago -
The Surface Laptop Studio 2 is no longer being manufactured
by
Alex5723
2 days, 7 hours ago -
0Patch, where to begin
by
cassel23
2 days, 1 hour ago -
CFPB Quietly Kills Rule to Shield Americans From Data Brokers
by
Alex5723
2 days, 21 hours ago -
89 million Steam account details just got leaked,
by
Alex5723
2 days, 8 hours ago -
KB5058405: Linux – Windows dual boot SBAT bug, resolved with May 2025 update
by
Alex5723
3 days, 5 hours ago -
A Validation (were one needed) of Prudent Patching
by
Nibbled To Death By Ducks
2 days, 20 hours ago -
Master Patch Listing for May 13, 2025
by
Susan Bradley
2 days, 7 hours ago -
Installer program can’t read my registry
by
Peobody
8 minutes ago -
How to keep Outlook (new) in off position for Windows 11
by
EspressoWillie
2 days, 18 hours ago -
Intel : CVE-2024-45332, CVE-2024-43420, CVE-2025-20623
by
Alex5723
3 days, 1 hour ago -
False error message from eMClient
by
WSSebastian42
3 days, 16 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.