Serial Monitor Start-up string vs. VBA serial communications

It appears the Arduino Forum might be the place to ask this question...

I have an Arduino sketch which works properly when testing with the serial monitor.

I have a Microsoft VBA routine which also makes the sketch work properly.

Now the problem, The VBA routine does NOTHING until I have first run and closed the Arduino Serial Monitor.

My guess is that there is an initialization string that the Arduino Serial Monitor uses to "start-up" the comm.

Does this sound right, and, do you know what that string would be so I can add it to my VBA start-up routine.

The Serial Monitor does nothing special.

A common problem for people writing PC programs to communicate with the Arduino is not allowing enough time for the Arduino to reset after the serial port is opened. A simple way to do this is to have the Arduino send a short message from setup() such as Serial.println("Ready"); and for the PC to wait until it receives that before doing anything else.

Another common problem is when the PC program briefly opens the serial port, sends something and closes the port. Next time the port is opened the Arduino will reset again. The PC program should open the port and keep it open until it is completely finished with the Arduino.

This demo written in Python illustrates what I am saying. The principle is the same in any language.

...R

The Serial Monitor does nothing special.

Actually, it does. It sets DTR=on, which is not the default. For some Arduinos, that is a necessary step.

PaulS:
Actually, it does. It sets DTR=on, which is not the default. For some Arduinos, that is a necessary step.

I was not aware of that.

I have never consciously done that with any PC program I have written and I have not had any trouble working with an Uno, Mega or Leonardo.

...R