Hello there. I'm currently in the process of designing a form that will allow people to request changes to our pretty locked down NTFS area. In order to do this, I need the user to be able to browse and select multiple files from a directory and their choices to appear in a richtext box that can then be submitted. So far this is what I have:
Sub CTRL56_5_OnClick(eventObj)
Set objDialog = CreateObject("UserAccounts.CommonDialog")
objDialog.Filter = "VBScript Scripts|*.vbs|All Files|*.*"
objDialog.Flags = &H0200
objDialog.FilterIndex = 1
intResult = objDialog.ShowOpen
If intResult = 0 Then
Wscript.Quit
Else
arrFiles = Split(objDialog.FileName, " ")
For i = 1 to Ubound(arrFiles)
strFile = arrFiles(0) & arrFiles(i)
Wscript.Echo strFile
Next
End If
End Sub
This isn't my code, I took it from elsewhere. It doesn't work, Infopath throws up an error about the Syntax of objDialog.Flags = &H0200. Am I completely barking up the wrong tree here? Does anyone know of a better way of doing it? Any help would be greatly appreciated.
Cheers