Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Column A has names of textfiles that need to be imported into collum
B. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
this seems to do the trick:
Dim InputString As String, FileNum As Integer colIndex = 1 For rwIndex = 1 To 10 With ActiveSheet.Cells(rwIndex, colIndex) FileName = "S:\sekretnew\server\brief\04IN\SE\109\boodsch ap\" Mid(.Value, 3) + ".txt" End With FileNum = FreeFile ' next free filenumber Open FileName For Input As #FileNum Line Input #FileNum, FileContent ' read a line from the textfile While Not EOF(FileNum) Line Input #FileNum, InputString ' read a line from th textfile FileContent = FileContent + Chr(10) + InputString Wend Close #FileNum ActiveSheet.Cells(rwIndex, 2).Value = FileContent Next rwInde -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Importing Text with Carriage Returns inside cell values | Excel Discussion (Misc queries) | |||
Importing Excel Data returns missing values | Excel Discussion (Misc queries) | |||
Convert textfiles into excel | Excel Worksheet Functions | |||
Importing textfiles in Excel 2007 | Setting up and Configuration of Excel | |||
cell with value returns that value, empty cell returns zero | Excel Worksheet Functions |