I have this list for making keynote lists for Revit, its set up in excel and i have to export a range of it to a unicode txt film.
I need it to save to a file called keynote.txt placed in the same folder as the source exel file.
I have this code but i returns an error in the 3th line and I can't seen to figure out what the problem is.
Sub ExportRange()
Dim ExpRng As Range
Open Savefile = ThisWorkbook.Path & "\KEYNOTE.txt" For Output As #1
Set ExpRng = Worksheets("KEYNOTE").Range("A1").CurrentRegion
FirstCol = ExpRng.Columns(1).Column
LastCol = FirstCol + ExpRng.Columns.Count - 1
FirstRow = ExpRng.Rows(9).Row
lastRow = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row
For r = FirstRow To lastRow
Data = ""
For c = FirstCol To LastCol
' data = ExpRng.Cells(r, c).Value
Data = Data & ExpRng.Cells(r, c).Value & vbTab
Next c
Print #1, Data
Next r
Close #1
End Sub