Solved

Finding the desktop folder of the current User in Access 2007 VBA

Posted on 2010-11-23
3
426 Views
Last Modified: 2012-05-10
Like it says in the title, I need to find a file on the desktop of the User that has my app open. I have code to look for file in a folder already - but where do I make it look at that desktop folder for the current User? Is there an easy way?

many thanks.
0
Comment
Question by:Peborgh
3 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 400 total points
ID: 34195968
Environ("USERPROFILE") & "\Desktop" will get you there.
0
 
LVL 47

Assisted Solution

by:Dale Fye (Access MVP)
Dale Fye (Access MVP) earned 100 total points
ID: 34196338
Or you can try the API call available via the code located at: http://www.mvps.org/access/api/api0054.htm

This API call gives you a variety of parameters for locating various folders on the users computer.
0
 

Author Comment

by:Peborgh
ID: 34196833
LSM...: it works! (why am I not surprised...)

Fyed: very comprehensive and will remain in my list of "useful things to know about" but for the moment, I will use LSM...'s simpler solution.

peter
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now