View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
todd todd is offline
external usenet poster
 
Posts: 48
Default GetDirectory Function

Function GetDirectory(InitDir As String, Flags As Long,
CntrDlg As Boolean, Msg) As String
Dim bInfo As BROWSEINFO
Dim pidl As Long, lpInitDir As Long

CntrDialog = CntrDlg ''Copy dialog centering setting
to module level variable so callback function can see it
With bInfo
.pidlRoot = 0 'Root folder = Desktop
.lpszTitle = Msg
.ulFlags = Flags

Above is only part of a function I got from a website long
ago. Does anyone know what I need to use to get it to
open the file dialog up at any other location other than 0
or root folder?

Thanks