I'm using a macro to create a CNC program.
To create the ".spf" file the machine is using I use:
Dim m2_path as string
m2_path = T:\Production\Cavity-Line\Eric R\Excel\PARAMETER.spf
Dim text as string
text = 'my data
Dim fso As Object
Dim Fileout As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Set Fileout = fso.CreateTextFile(m2_path, True, True)
Fileout.Write text
Fileout.Close
When I try to open the program on the machine I get a error "Cannot open binary files".
But If I manually copy the content from the "m2_path"-file into another one and then try to open it, I don't get the error message.
Is there something wrong with the formatting of the text file?
Machine is using SINUMERIK 840d sl.
Thanks in advance
Regards
EDIT:
Thanks to @ashleedawg