I found this solution...not sure if it will work generally on everything or notany advice is welcomedCode:Sub exporttext() Dim i As Integer Dim fso As FileSystemObject Dim hope As TextStream Set fso = New FileSystemObject Set hope = fso.CreateTextFile("D:\hope.txt", True) With hope For i = 1 To 10 .WriteLine (Cells(i, 1) & Space(37 - Len(Cells(i, 1)) - Len(Cells(i, 2))) & Cells(i, 2)) Next i .Close End With Dim x x = Shell("notepad.exe d:\hope.txt", 1) End Sub


LinkBack URL
About LinkBacks



Reply With Quote

Bookmarks