Need help in uploading code

See if this solves the issue: Port monitor error: command 'open' failed: Invalid serial port. Could not connect to COM serial port - #49 by ptillisch

Btw, R3 is the Uno with 328P, R4 is the modern equivalent.