Pixelpusher
10-21-2009, 12:56 AM
Hi all,
does anyone know how to remove the file extention from the file list returned with the code below. I have been trying to adapt this "WBname = Replace(wb. Name, ".xls", "") but with no joy. Thanks
Private Sub UserForm_Initialize()
Dim sFile As String
sFile = Dir$("E:\WADE\records_excel\*.*")
Do Until sFile = ""
If Left$(sFile, 1) <> "." Then
list1.AddItem sFile
End If
sFile = Dir$
Loop
End Sub
does anyone know how to remove the file extention from the file list returned with the code below. I have been trying to adapt this "WBname = Replace(wb. Name, ".xls", "") but with no joy. Thanks
Private Sub UserForm_Initialize()
Dim sFile As String
sFile = Dir$("E:\WADE\records_excel\*.*")
Do Until sFile = ""
If Left$(sFile, 1) <> "." Then
list1.AddItem sFile
End If
sFile = Dir$
Loop
End Sub