Greetings,

A while ago someone gave me this function for browsing for a folder. It works great for me on my machine. The problem is, that when I install the program on our customer's 98 machine, the "Choose a folder box" does not appear when she clicks the button; and then she has to enter the folder name manually.

Any idea why it acts that way on her machine, and how I can fix the problem?

The code is below.

Thank you,
Jim

Private Sub cmdDirectoryBrowse_Click()
Dim i, flag As Integer
Dim sAnswer(50) As String
i = 0
flag = 1
sAnswer(i) = " " & BrowseForFolder("Choose a folder!", 0, 0)
lstDirectoriesToScan.AddItem (sAnswer(i))
While flag = 1
If MsgBox("Would you like an additional directory to be scanned?", vbYesNo) = vbYes Then
'Yes was selected
i = i + 1
sAnswer(i) = " " & BrowseForFolder("Choose a folder!", 0, 0)
lstDirectoriesToScan.AddItem (sAnswer(i))
Else
'No was selected
flag = 0
End If
Wend
dircount = lstDirectoriesToScan.ListCount
End Sub