Thanks, it does work now. But I don't want a message box, but one line of code in Private Sub CommandButton_Click() only when the OS is Windows NT.
The line of code I need is:
sBat = sBat & "echo." & vbCrLf & "pause"
This is to put the command "pause" at the end of a batchfile when the OS is WinNT.
I've tried everything that seemed logical to me, but I'm out of ideas now. Do you have a suggestion?
Speek