Parsnip, Roy, ByTheCringe2 and Dave, thanks for replying.
I put the suggested replacement
code in from both Parsnip and Roy but I can't get things to work. Due to my ignorance of VB I have to say. I have looked and tried to understand the suggested code but I can't see where I need to change/add things to make it work as the file does in Excel 2003. I neglected to add the Sheet1 code to my first thread entry.
This is it.
VB: AutoLinked keywords will cause extra spaces before keywords. Extra spacing is NOT transferred when
copy/pasting, but IS if the keyword uses "quotes".
Private Sub CommandButton1_Click()
Dim filenamelist()
As Variant
filenameslist = CreateFileList("*.*",
False)
If Not IsArray(filenameslist)
Then
MsgBox "No files"
Exit
Sub
End If
For i = 1
To UBound(filenameslist)
ActiveSheet.
Cells(10 + i, 1).Value = filenameslist(i)
Next i
End Sub
I don't even know if you need it for the replies.
I have put Parsnip's and Roy's code in but because of my very limited VB knowledge, can't get it to work.
With Parsnip's code, I get either 'No files found" or nothing happens at all, depending on the
changes I make.
In Roy's code it says "do something" but I don't even know what to enter at this point.
If someone has the time and would be willing to try the
attached file in Excel 2003, he/she will see how it works and maybe tell me what to change where.
The code in the attached file is obviously not written by me.
Your help is greatly appreciated.
Thanks and regards.
John