Hello,
I have created a macro that pastes a range of excel data (via a loop function) into a .dat file, which is later FTP'd to another team. The only issue that I'm running into is that they cannot accept the file with a space at the end, which is unfortunately automatically entered into the .dat file by my vba code.
Has anyone ever encountered this issue before? Any advice would be EXTREMELY appreciated.
Thanks in advance.
CODE:
Sheets(sheet1).Select
Endrow = Range("B999999").End(xlUP).Row
MyFile = "\\C:....."
fnum = FreeFile()
Open MyFile For Output As fnum
x = 2 to endrow
Print #fnum, Range("B"&X)
Next x
End Sub
I have created a macro that pastes a range of excel data (via a loop function) into a .dat file, which is later FTP'd to another team. The only issue that I'm running into is that they cannot accept the file with a space at the end, which is unfortunately automatically entered into the .dat file by my vba code.
Has anyone ever encountered this issue before? Any advice would be EXTREMELY appreciated.
Thanks in advance.
CODE:
Sheets(sheet1).Select
Endrow = Range("B999999").End(xlUP).Row
MyFile = "\\C:....."
fnum = FreeFile()
Open MyFile For Output As fnum
x = 2 to endrow
Print #fnum, Range("B"&X)
Next x
End Sub