View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default [XL2000] ObjFolder.Self.Path - 438 error

Try...

FolderName = oFolder.items.Item.Path
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Mike Iacovou"

wrote in message
In XL2000 i am receiving a 438 'object doesn't support this property / method
error on the line 'Foldername = oFolder.Self.Path'. I have tried without the
"Self" as it doesn't appear to be supported in Xl2000, but the error
persists. My test environment is Win98 | XL2000 - but the error was reported
on a system apparently running WinXP | XL2000. Any pointers appreciated...

Function ChooseFolder()
Dim oApp As Object
Dim oFolder As Object
Dim FolderName As String

Set oApp = CreateObject("Shell.Application")
Set oFolder = oApp.BrowseForFolder(0, "Choose Folder", 512)
If Not oFolder Is Nothing Then
FolderName = oFolder.Self.Path
If Right(FolderName, 1) < "\" Then
FolderName = FolderName & "\"
End If
ChooseFolder = FolderName
End If
End Function