G
Guest
I need to replace the 1st "." in
"(e-mail address removed)" with "_". Or I need to remove
it completely. This is a filename that I need to import, but this period is
causing the import to error out.
Actually I am writing a proc that will cycle through the .csv files in a
folder and I need to make the above replacement for all .csv files that start
with "PartnerContract". Below is the code I have so far. Any suggestions as
to how I can complete this would be greatly appreciated.
'Set file type.
strFile = Dir$(PathName & "*.csv*")
'Check if any .csv files are in Imports directory.
If Len(strFile) > 0 = False Then
MsgBox "There are no update files.", vbOKOnly, "WARNING"
Exit Sub
End If
'Import all .csv files in Imports directory.
Do While Len(strFile) > 0
If Left(strFile, 15) = "PartnerContract" Then
strFile = Dir$()
End If
Loop
"(e-mail address removed)" with "_". Or I need to remove
it completely. This is a filename that I need to import, but this period is
causing the import to error out.
Actually I am writing a proc that will cycle through the .csv files in a
folder and I need to make the above replacement for all .csv files that start
with "PartnerContract". Below is the code I have so far. Any suggestions as
to how I can complete this would be greatly appreciated.
'Set file type.
strFile = Dir$(PathName & "*.csv*")
'Check if any .csv files are in Imports directory.
If Len(strFile) > 0 = False Then
MsgBox "There are no update files.", vbOKOnly, "WARNING"
Exit Sub
End If
'Import all .csv files in Imports directory.
Do While Len(strFile) > 0
If Left(strFile, 15) = "PartnerContract" Then
strFile = Dir$()
End If
Loop