|
-
Feb 17th, 2006, 06:43 PM
#1
Thread Starter
Addicted Member
[RESOLVED] just a quickie how to open a folder
i was wondering how would i open a folder on a cd using code from clicking a label
-
Feb 17th, 2006, 06:49 PM
#2
Re: just a quickie how to open a folder
VB Code:
Private Sub Label1_Click
Shell "explorer.exe d:\windows", vbNormalFocus
End Sub
Change the path to the folder (including the drive letter if its on a cd)
-
Feb 17th, 2006, 07:00 PM
#3
Thread Starter
Addicted Member
Re: just a quickie how to open a folder
oops sorry i should of said im working from a cd trying to use the app.path method.
i have labels named after the folder of where my apps are and when a user clicks on a label the corresponding folder opens.(well its supposed to)
-
Feb 17th, 2006, 07:07 PM
#4
Re: just a quickie how to open a folder
I assume you mean you have the labels caption set to the folder path? So you could do:
VB Code:
Private Sub Label1_Click
Shell "explorer.exe " & App.Path & "\" & Label1.Caption, vbNormalFocus
End Sub
This will work if your labels caption is like 'MyFolder' or 'MyFolder\NewFolder' be sure to change the drive letter to your CD drive letter
-
Feb 17th, 2006, 07:12 PM
#5
Thread Starter
Addicted Member
Re: just a quickie how to open a folder
thanks its working now cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|