Pinaceous
Well-known Member
- Joined
- Jun 11, 2014
- Messages
- 1,124
- Office Version
- 365
- Platform
- Windows
Good Day All,
I managed to come up with a vba code that I am comfortable in using with respect to converting a specified worksheet into a txt file.
However, I would like to know where I can specify which sheet range?
For example, if I want to capture only for the range between A1:AY36.
Where would I put this into the code?
Kindly let me know.
Thank you!
pinaceous
I managed to come up with a vba code that I am comfortable in using with respect to converting a specified worksheet into a txt file.
However, I would like to know where I can specify which sheet range?
VBA Code:
Sub ExportToTXT()
Dim columnA As Variant
With Worksheets(9)
columnA = Application.Transpose(.Range("A1", .Cells(.Rows.Count, "A").End(xlUp)).Value)
End With
ThisWorkbook.SaveAs ThisWorkbook.path & "\textfile-" & Format(Now, "ddmmyy-hhmmss") & ".txt", 20
End Sub
For example, if I want to capture only for the range between A1:AY36.
Where would I put this into the code?
Kindly let me know.
Thank you!
pinaceous