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
Solved

Open A Specific Folder on Windows 95/98 Computers

Posted on 2003-12-02
7
190 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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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…

856 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