Sub MakeRows()
Dim FF As Integer, cell As Range
Dim srtPath As String, strFile As String
strPath = "C:\" 'File path
strFile = "File.bat" 'File name
With Range("B1", Range("A65536").End(xlUp).Offset(, 1))
' Autofill the formula for each row of HTAG numbers
Range("B1").AutoFill Destination:=.Cells
'Write Values to text file
FF = FreeFile()
Open strPath & strFile For Output As #FF
For Each cell In .Cells
Print #FF, cell.Text
Next cell
Close #FF
End With
MsgBox strPath & strFile, vbInformation, "HTAG Text Saved"
End Sub
Bookmarks