Solved

Open A Specific Folder on Windows 95/98 Computers

Posted on 2003-12-02
7
192 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

739 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