View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
kwilson kwilson is offline
external usenet poster
 
Posts: 4
Default need VB list property for file contents

Hi Tom -

First, thanks for your response and willingness to help! I need content
from text files placed into excel cells in column just like the file names
are placed. I'm not sure what specific property I need placed there - that's
where I need your help. I need to know what property to write in place of
"MsoAlertDefaultType" so I can get the contents of those files extracted and
placed into those cells. I hope this isn't confusing!

Thanks again for your help!.

"Tom Ogilvy" wrote:

What information do you want placed in the third column? (what property do
you want placed there). MsoAlertDefaultType is pretty much meaningless to
me, so I don't know what the intent was.

If you don't know what you want there, then I suggest just deleting the
line.

--
Regards,
Tom Ogilvy



"kwilson" wrote in message
...
I am trying to insert content from 1000 text files into a column in excel

and
I found this module in another post and am trying to modify it. The word
that needs to be replaced with the correct property is

"MsoAlertDefaultType".
I'm not very knowledgable in VB so any help is greatly appreciated! The
module is below:

Sub Test()
Call ListWordFiles("C:\Biology")
End Sub

Sub ListWordFiles(Folder As String)
Dim NextFile As String
Dim L As Long
On Error Resume Next

NextFile = Dir(Folder & "\*")
Do Until NextFile = ""
L = L + 1
Cells(L, 1) = Folder & "\" & NextFile
Cells(L, 2) = FileDateTime(Folder & "\" & NextFile)
Cells(L, 3) = MsoAlertDefaultType(Folder & "\" & NextFile)
NextFile = Dir()
Loop
End Sub


Thanks,

Kelly