View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ivan Raiminius Ivan Raiminius is offline
external usenet poster
 
Posts: 258
Default retrieving Text from a textfile in Excel

Hi,

only part of code, that you can incorporate into yours:

Dim fsFs As Object
Dim fsInput As Object

Set fsFs = CreateObject("Scripting.FileSystemObject")
Set fsInput = fsFs.OpenTextFile(Filename:=InputFile, _
IOMode:=ForReading, create:=False,
_
Format:=TristateUseDefault)
msgbox fsInput.readline
fsInput.close

'Input file = full file name including path

Regards,
Ivan