First, I have researched other postings about this problem but sadly none solve my particular problem (except possibly a suggestion to reboot).
I have been happily running a sketch, with output showing up in the serial monitor. Then I made a slight change to the program (sketch) and tried to reload. The program contains no syntax errors - it compiles OK (clicked Verify), but then when I try to upload (via USB) to my Arduino Uno I see the error message in the title. Serial Port under the Tools menu is grayed out.
I've checked the Device Manager and the drivers are up-to-date; anyway the Serial Monitor was working a few minutes ago. I continue to get the error even when I comment out all lines pertaining to Serial output.
I could probably correct this by rebooting the PC (which is running Windows 7) but that seems a lot of unnecessary effort. Is there a command I need to use in a sketch similar to output.close(), explicitly to close the port, which seems to have remained open from the prior program?
I'm an experienced programmer but very much an amateur with electronics.
Thanks.