i was wondering how would i open a folder on a cd using code from clicking a label
Printable View
i was wondering how would i open a folder on a cd using code from clicking a label
Change the path to the folder (including the drive letter if its on a cd)VB Code:
Private Sub Label1_Click Shell "explorer.exe d:\windows", vbNormalFocus End Sub
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)
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
thanks its working now cheers