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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperlink to a Folder 2

Status
Not open for further replies.

Jack58

Technical User
May 6, 2002
91
0
0
US
Is it possible to create a link to Open a Folder?. Example;

c:/Download/Help

and display the contents in explorer?

I have found that a Hyperlink will only work linked directly to a file.


Thanks



Jack
 
Have you tried something like this ?
CreateObject("WScript.Shell").Run "c:/Download/Help"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I used the following code on a command Button,

CreateObject("WScript.Shell").Run "X:\Purchasing\Unfilled Report",

Received the following error,

Methodd "Run" of Object IWshSheel3' Failed


Hope this helps solve this problem.


Thanks again



Jack
 
Which version of Microsoft Scripting Runtime ?
(In a console window, type cscript //v)
Anyway, your folder name contains embedded space, so I'll try this:
Set sh = CreateObject("WScript.Shell")
sh.Run """X:\Purchasing\Unfilled Report"""
or
sh.Run Chr(34) & "X:\Purchasing\Unfilled Report" & Chr(34)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I am in Microsoft Access 2000 not the Script Editor. I am not to sure what you are referancing here. I have tryed both codes and either work.

Could it be that I need to enter the entire network address to the folder?

epsrv1\Purchasing\General


Thanks



Jack
 
When I got the following code entered,

Private Sub Command6_Click()
Set sh = CreateObject("WScript.Shell")
sh.Run """X:\Purchasing\Unfilled Report"""

End Sub

I received a Compile Error Variable Not Defined,

Hope you can help me out


Thanks Again!!!



Jack
 
I have even tryed the following with no luck,

Private Sub Command6_Click(SetSh As Variant)

Dim SetSh As Variant

SetSh = CreateObject("WScript.Shell")
sh.Run """X:\Purchasing\Unfilled Report"""

End Sub


Jack
 
And this ?
Private Sub Command6_Click(SetSh As Variant)
Dim Sh As Object
Set Sh = CreateObject("WScript.Shell")
Sh.Run """X:\Purchasing\Unfilled Report"""
End Sub


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
When I enter the above code , then invoke the command button I am getting a long error message, stateing that the procedure does not match.

Not to sure what to do with this.

I am awarding you a star for all your help, and hoping you will continue to help on this project.



Jack
 
I am getting a long error message
You know what ? I think it would be helpful to post the whole error message...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Here is the error,

The Expression on Click you enteredas the event property setting produced the following error,
Procedure declaration does not match description of event or procedure having the same name.
* the Expression may not result in the name of a macro, the name of a used-defined fuction, or [Event prodedure]
*there may have been a error evaluating the fuction, event or Macro.

Hope this helps



Jack
 
My bad:
Private Sub Command6_Click()
Dim Sh As Object
Set Sh = CreateObject("WScript.Shell")
Sh.Run """X:\Purchasing\Unfilled Report"""
End Sub

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top