Hi Lynn
something like...VB:Sub ExportRange() Dim ExpRng As Range Set ExpRng = ActiveCell.CurrentRegion FirstCol = ExpRng.Columns(1).Column LastCol = FirstCol + ExpRng.Columns.Count - 1 FirstRow = ExpRng.Rows(1).Row LastRow = FirstRow + ExpRng.Rows.Count - 1 Open ThisWorkbook.Path & "\ptest File.txt" For Output As #1 For r = FirstRow To LastRow For c = FirstCol To LastCol Debug.Print Cells(r, c).Value data = Cells(r, c).Value Write #1, data Next c Next r Close #1 End Sub


Reply With Quote
Bookmarks