So basically you are receiving unicode from your com port and writing that to a file?
As for the sub. It doesn't matter how many places you call it from it should not be done like that. Is a waste of code and makes your program slower.
Consider this
The code below would do exactly the same thing. the difference is you have 1 line instead of 4 and you do not need to call an additional sub routine nor pass an additional variable, The line of code is also shorter than the line you use to call it in your existing code.Code:' other code Call write_log_file(transaction) End Sub Public Sub write_log_file(inString As String) Print #fhandle, inString; End Sub
Code:' other code Print #fhandle, transaction End Sub




Reply With Quote
