Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old January 4th, 2007, 08:22 AM
Authorized User
 
Join Date: Jan 2007
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default opening a folder location

hi,
would like a button that opens he folder created earlier by a procedure.
My question is what is the VBA to open a folder, im sure its a easy question for you guys!

Cheers


  #2 (permalink)  
Old January 4th, 2007, 08:26 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

What do you mean "open a folder?"


mmcdonal
  #3 (permalink)  
Old January 4th, 2007, 09:36 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: Salisbury, Wiltshire, United Kingdom.
Posts: 155
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to leehambly
Default

Assuming you mean to open an Explorer window at the given folder location... try something like:

Call Shell("explorer.exe X:\Location\etc", vbNormalFocus)
  #4 (permalink)  
Old January 4th, 2007, 01:48 PM
Authorized User
 
Join Date: Jan 2007
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

cheers how can i call the folder from a string?

  #5 (permalink)  
Old January 4th, 2007, 05:42 PM
Registered User
 
Join Date: Oct 2006
Location: Leigh, Lancashire, United Kingdom.
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Do you mean to put a file in the folder or to physically open the folder to display it?
  #6 (permalink)  
Old January 5th, 2007, 06:54 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: Salisbury, Wiltshire, United Kingdom.
Posts: 155
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to leehambly
Default

Jonni,

What do you mean by: "... call the folder from a string"?
  #7 (permalink)  
Old January 5th, 2007, 09:01 AM
Authorized User
 
Join Date: Jan 2007
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

sorry i was not sure how to formulate my question (obviously)
its working now,

    Dim strShortcut As String
    strShortcut = Me.txtShortcut

    Call Shell("explorer.exe " & strShortcut, vbNormalFocus)

i had problems where i did not leave a space between .exe and the " but its working now, cheers for taking time to ponder my query
Jonni



Similar Threads
Thread Thread Starter Forum Replies Last Post
local folder location euschenk Classic ASP Basics 3 March 5th, 2008 04:46 PM
Copy A folder to another location saidan C# 2005 18 November 10th, 2007 06:08 AM
Project Folder Location ag19702004 Visual Studio 2005 0 March 14th, 2007 12:25 PM
browsing for a folder, opening file am6019a VB How-To 5 February 21st, 2007 07:09 PM
Opening a folder from VB Axxess Excel VBA 2 September 6th, 2006 05:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.