rlamoreaux
Programmer
Have the following code. The problem I'm having is, If there is a file named myfile,yourfile,therefile.xyz in the inbox folder, the list of files generated by the ofilelist = ofolder.files command is
myfile
yourfile
therefile.xyx
There seems to be a problem when there is embedded commas????
Dim vFile, strRowSource, strPath
Dim oFileSys As New Scripting.FileSystemObject
Dim oFolder, oFileList As Object
''''''''''''''''''''''''''''''''''''''''
'Load and open inbox document container
''''''''''''''''''''''''''''''''''''''''
strPath = CurrentProject.path & "\"
Set oFolder = oFileSys.GetFolder(strPath & "inbox\"
Set oFileList = oFolder.Files
strRowSource = ""
For Each vFile In oFileList
strRowSource = strRowSource & vFile.Name & ";"
Next
Me.lbxFiles.SetFocus
Me.lbxFiles.RowSourceType = "Value List"
Me.lbxFiles.RowSource = strRowSource
myfile
yourfile
therefile.xyx
There seems to be a problem when there is embedded commas????
Dim vFile, strRowSource, strPath
Dim oFileSys As New Scripting.FileSystemObject
Dim oFolder, oFileList As Object
''''''''''''''''''''''''''''''''''''''''
'Load and open inbox document container
''''''''''''''''''''''''''''''''''''''''
strPath = CurrentProject.path & "\"
Set oFolder = oFileSys.GetFolder(strPath & "inbox\"
Set oFileList = oFolder.Files
strRowSource = ""
For Each vFile In oFileList
strRowSource = strRowSource & vFile.Name & ";"
Next
Me.lbxFiles.SetFocus
Me.lbxFiles.RowSourceType = "Value List"
Me.lbxFiles.RowSource = strRowSource