I looked at the link but I'm not sure I fully understand what you're trying to do. But first to explain a bit about why iLogic code doesn't work in VBA. iLogic is based on VB.Net and VBA is using the same engine as Visual Basic 6. They're very similar but still two different flavor of the Visual Basic language. One very big difference is that the full .Net Framework is accessible from VB.Net. The object you were trying to use in VBA is a .Net Framework object and is not available in VBA.
Here's a pure VBA program that does something somewhat similar to what you asked. It reads in a file, extracts pieces it's interested in and writes it out in a reformatted way.
First, here's the original input data.
Block, Steel, 5, Red
Cylinder, Copper, 2, Yellow
Cone, Glass, 8, Green
Mushroom, Steel, 59, Blue-Green
Tree,Mud,33, Purple
Sphere, Titanium, 11, Silver
Pyramid, Carbon Fiber, 2, Black
And here's the result file that the program creates.
Block 5 Red
Cylinder 2 Yellow
Cone 8 Green
Mushroom 59 Blue-Green
Tree 33 Purple
Sphere 11 Silver
Pyramid 2 Black
Here's the program:
Public Sub Reformat()
Dim newFilename As String
newFilename = "C:\Temp\Newfile.txt"
Dim newfile As Integer
newfile = FreeFile
Open newFilename For Output As newfile
Dim existingFilename As String
existingFilename = "C:\Temp\Test.txt"
Dim existingFile As Integer
existingFile = FreeFile
Open existingFilename For Input As existingFile
Do While Not EOF(existingFile)
' Read the existing line from the file.
Dim inputData As String
Line Input #existingFile, inputData
' Extract the bits out of the line that you want. This
' example assumes they're comma delimited.
Dim pieces() As String
pieces = Split(inputData, ",")
' Clean up any white space
Dim i As Integer
For i = 0 To UBound(pieces) - 1
pieces(i) = Trim$(pieces(i))
Next
' Using the wanted pieces, build the output string.
Dim result As String
result = pieces(0) & Space(25 - Len(pieces(0)))
result = result & pieces(2) & Space(10 - Len(pieces(2)))
result = result & pieces(3)
' Write the line, reformatted.
Print #newfile, result
Loop
Close #newfile
Close #existingFile
End Sub