Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save to specific location defined by the user 3

Status
Not open for further replies.

robojeff

Technical User
Dec 5, 2008
220
US
I am creating excel spread sheets from within Access and since moving the database onto the server, I would like prompt the user to specify where to save their spreadsheets along with the browse function much like other Windows applications have.

Is there an easy way to do this or a canned function call in Windows to handle the browsing and choosing of a destination folder from within Access (2003)?

Thanks

 
You may try this function:
Function PickFolder(strStartDir)
Dim SA, F
Set SA = CreateObject("Shell.Application")
Set F = SA.BrowseForFolder(0, "Choose a folder", 0, strStartDir)
If (Not F Is Nothing) Then
PickFolder = F.Items.Item.path
End If
Set F = Nothing
Set SA = Nothing
End Function
 
The original code was posted here:
thread329-1185564
 
yes apologies, that was pulled out of my useful vbscript function text files...which came from various useful posts, I have to admit of few of them were posted by PHV :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top