Sub test()
Dim Enrgt As String, Wbk As Workbook, C As Range
Close #1
Set Wbk = Workbooks.Open("FDS.xlsm")
With Sheets("35x2")
Enrgt = ""
For Each C In .Range("F7", .Cells(.Rows.Count, "F").End(xlUp))
If Enrgt <> "" Then Enrgt = Enrgt & vbCrLf
Enrgt = Enrgt & C.Value
Next C
Open "X.txt" For Output As #1
Print #1, Enrgt
Close #1
End With
With Sheets("30x2")
Enrgt = ""
For Each C In .Range("F7", .Cells(.Rows.Count, "F").End(xlUp))
If Enrgt <> "" Then Enrgt = Enrgt & vbCrLf
Enrgt = Enrgt & C.Value
Next C
Open "Y.txt" For Output As #1
Print #1, Enrgt
Close #1
End With
End Sub