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
-
Auto Time Zone Adjustment
by
wadeer
1 hour, 8 minutes ago -
To download Win 11 Pro 23H2 ISO.
by
Eddieloh
6 hours, 20 minutes ago -
Manage your browsing experience with Edge
by
Mary Branscombe
6 hours, 58 minutes ago -
Fewer vulnerabilities, larger updates
by
Susan Bradley
52 minutes ago -
Hobbies — There’s free software for that!
by
Deanna McElveen
3 hours, 10 minutes ago -
Apps included with macOS
by
Will Fastie
2 hours, 3 minutes ago -
Xfinity home internet
by
MrJimPhelps
11 hours, 50 minutes ago -
Convert PowerPoint presentation to Impress
by
RetiredGeek
3 minutes ago -
Debian 12.11 released
by
Alex5723
22 hours, 16 minutes ago -
Microsoft: Troubleshoot problems updating Windows
by
Alex5723
1 day, 1 hour ago -
Woman Files for Divorce After ChatGPT “Reads” Husband’s Coffee Cup
by
Alex5723
5 hours, 24 minutes ago -
Moving fwd, Win 11 Pro,, which is best? Lenovo refurb
by
Deo
22 hours, 26 minutes ago -
DBOS Advanced Network Analysis
by
Kathy Stevens
1 day, 18 hours ago -
Microsoft Edge Launching Automatically?
by
healeyinpa
1 day, 9 hours ago -
Google Chrome to block admin-level browser launches for better security
by
Alex5723
1 day, 21 hours ago -
iPhone SE2 Stolen Device Protection
by
Rick Corbett
1 day, 13 hours ago -
Some advice for managing my wireless internet gateway
by
LHiggins
21 hours, 22 minutes ago -
NO POWER IN KEYBOARD OR MOUSE
by
HE48AEEXX77WEN4Edbtm
14 hours, 13 minutes ago -
A CVE-MITRE-CISA-CNA Extravaganza
by
Nibbled To Death By Ducks
2 days, 7 hours ago -
Sometimes I wonder about these bots
by
Susan Bradley
2 days, 3 hours ago -
Does windows update component store “self heal”?
by
Mike Cross
1 day, 17 hours ago -
Windows 11 Insider Preview build 27858 released to Canary
by
joep517
2 days, 20 hours ago -
Pwn2Own Berlin 2025: Day One Results
by
Alex5723
1 day, 4 hours ago -
Windows 10 might repeatedly display the BitLocker recovery screen at startup
by
Susan Bradley
17 hours, 35 minutes ago -
Windows 11 Insider Preview Build 22631.5409 (23H2) released to Release Preview
by
joep517
2 days, 23 hours ago -
Windows 10 Build 19045.5912 (22H2) to Release Preview Channel
by
joep517
2 days, 23 hours ago -
Kevin Beaumont on Microsoft Recall
by
Susan Bradley
2 days, 12 hours ago -
The Surface Laptop Studio 2 is no longer being manufactured
by
Alex5723
3 days, 7 hours ago -
0Patch, where to begin
by
cassel23
3 days, 1 hour ago -
CFPB Quietly Kills Rule to Shield Americans From Data Brokers
by
Alex5723
3 days, 21 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.