Solved

Open A Specific Folder on Windows 95/98 Computers

Posted on 2003-12-02
7
188 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
ID: 9860026
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
ID: 9860156
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
ID: 9860161
Thanks you Eric.  I will try it tonight.

WonHop
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 2

Author Comment

by:WonHop
ID: 9867157
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
ID: 10212140
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
ID: 10266356
PAQed, with points refunded (100)

SpazMODic
EE Moderator
0
 
LVL 2

Author Comment

by:WonHop
ID: 10271011
Thanks SpazMODic

WonHop
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Excel Spreadsheet - Send email if certain value is selected. 14 87
DIR issue 7 51
Determine Range to Select 5 43
How to set the sa password in a vb6 code for sql connection 9 38
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

867 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

21 Experts available now in Live!

Get 1:1 Help Now