gibbo1715
10-22-2006, 09:53 AM
All
Im using the code below to browse for a folder (I think this came form DrJ)
Function GetFolderPath() As String
Dim oShell As Object
Set oShell = CreateObject("Shell.Application"). _
BrowseForFolder(0, "Please Select Location", 0, "c:\\")
If Not oShell Is Nothing Then
GetFolderPath = oShell.Items.Item.Path
Else
GetFolderPath = vbNullString
End If
Set oShell = Nothing
End Function
Can anyone tell me how i can capture when the cancel button is pressed
thanks
gibbo
Im using the code below to browse for a folder (I think this came form DrJ)
Function GetFolderPath() As String
Dim oShell As Object
Set oShell = CreateObject("Shell.Application"). _
BrowseForFolder(0, "Please Select Location", 0, "c:\\")
If Not oShell Is Nothing Then
GetFolderPath = oShell.Items.Item.Path
Else
GetFolderPath = vbNullString
End If
Set oShell = Nothing
End Function
Can anyone tell me how i can capture when the cancel button is pressed
thanks
gibbo