VB6 click to bring explorer

Acccessme

Baseband Member
Messages
26
Hi everyone,

I am creating a CD that would run a form on of the button when click it should bring explorer but I want to show what is on the CD. Right now when I clicked on it, it opens explorer but it shows what is in My Documents folder. this is the code I have right now:

Dim fsoX As Scripting.FileSystemObject
Dim strX As String
Set fsoX = New Scripting.FileSystemObject
strX = fsoX.GetSpecialFolder(0).Path
strX = fsoX.BuildPath(strX, "\Explorer.exe")
Shell strX, vbNormalFocus

Again thanks for the help
JAC
 
How about

Shell("C:\Windows\explorer.exe DRIVELETTER:")?

Swap DRIVELETTER for your CD Drive e.g. E:

Hope that helps, if I've misunderstood the question please ask again.
 
Back
Top Bottom