There's a couple of ways I would do it, and they both need the selection made before the sub (Macro) is run.
Sub SaveSelectedRows()
'Select only Cells in Column "J"
Dim Cel As Range
MyFile = "C:\Users\DJ-PC\Desktop\Text\" & ActiveSheet.Range(UserRange).Value & ".txt"
For Each Cel In Selection
'-- Save Text in Column 10 Cells
s = NewLn(Cel) & vbNewLine
fnum = FreeFile
Open MyFile For Output As fnum
Print #fnum, s
Close fnum
Next Cel
End Sub
Sub SaveSelectedRows()
'Select Entire Rows
Dim Cel As Range
MyFile = "C:\Users\DJ-PC\Desktop\Text\" & ActiveSheet.Range(UserRange).Value & ".txt"
For Each Cel In Selection.Columns(10)
'-- Save Text in Column 10 Cells
s = NewLn(Cel) & vbNewLine
fnum = FreeFile
Open MyFile For Output As fnum
Print #fnum, s
Close fnum
Next Cel
End Sub
To do it with a reminder to select something after running the Macro will require two new subs in addition to one of the above, and changing the name of that one. OK, I combined both the above subs for more flexibility.
Option Explicit
SaveTextEnabled As Boolean
Sub SaveSelectedRows()
MsgBox "PLease Select the Rows or cells to save"
SaveTextEnabled = True
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If SaveTextEnabled Then SaveTexts
End Sub
Sub SaveTexts()
'Select Entire Rows or select Column "J"
SaveTextEnabled = False
Dim Texts As Range
Dim Cel As Range
MyFile = "C:\Users\DJ-PC\Desktop\Text\" & ActiveSheet.Range(UserRange).Value & ".txt"
If Selection.Columns.Count > 1 Then
Set Texts = Intersect(Selection, Columns(10))
Else
Set Texts = Selection
End If
For Each Cel In Texts
s = NewLn(Cel) & vbNewLine
fnum = FreeFile
Open MyFile For Output As fnum
Print #fnum, s
Close fnum
Next Cel
End Sub