Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Open A Specific Folder on Windows 95/98 Computers

Posted on 2003-12-02
7
Medium Priority
?
196 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
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!

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

721 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