Solved

Open A Specific Folder on Windows 95/98 Computers

Posted on 2003-12-02
7
187 Views
Last Modified: 2010-05-01
Hello guys.  I have some code that opens a specific folder.  It works fine on Windows XP/2000.
It does not work on Windows 95/98.  Is the code different for the two versions.
This is what I have that is working on Windows XP/2000

Shell "explorer.exe E:\Pictures", vbNormalFocus

Also, I don't have a Window 95 computer here at work, so I won't be able to test it until tonight.
For that reason, if I get a working solution, I will award the points tomorrow.

Thanks
WonHop
0
Comment
Question by:WonHop
7 Comments
 
LVL 4

Expert Comment

by:eric0213
Comment Utility
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Private Sub Form_Load()
    'To display it in windows explorer
    ShellExecute Me.hwnd, "Explore", "c:\temp", vbNullString, vbNullString, vbNormalFocus
   
    'To simply open the folder
    ShellExecute Me.hwnd, "Explore", "c:\temp", vbNullString, vbNullString, vbNormalFocus
End Sub

'HTH
'Eric
0
 
LVL 4

Expert Comment

by:eric0213
Comment Utility
Sorry, got carried away with the cut-and-paste...

To open the folder, use:
ShellExecute Me.hwnd, "Open", "c:\temp", vbNullString, vbNullString, vbNormalFocus
0
 
LVL 2

Author Comment

by:WonHop
Comment Utility
Thanks you Eric.  I will try it tonight.

WonHop
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 2

Author Comment

by:WonHop
Comment Utility
Hello Eric.  I tried your solution, but it did not work.
Just like the other code...it works on Windows  XP, but not on Windows 95.
Do you have any other suggestions?  Maybe a Reference that needs to be set or something like that.

WonHop
0
 
LVL 29

Expert Comment

by:leonstryker
Comment Utility
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

PAQ/Refund
 
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

leonstryker
EE Cleanup Volunteer
0
 

Accepted Solution

by:
SpazMODic earned 0 total points
Comment Utility
PAQed, with points refunded (100)

SpazMODic
EE Moderator
0
 
LVL 2

Author Comment

by:WonHop
Comment Utility
Thanks SpazMODic

WonHop
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 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

16 Experts available now in Live!

Get 1:1 Help Now