Arduino UNO R3 when uploading gets error message:avrdude: ser_open(): can't open

I just got a hold of an Arduino UNO R3, and when i tried to upload the code, this came up:

avrdude: ser_open(): can't open device "\.\COM1": The system cannot find the file specified.

Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

If anybody can help me, please do.
Thanks!

See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

I've read that. Whine on the forum is way down on the list. What steps have you tried? With what results?

I have changed the programmer and tried uploading using each programmer. The result was a fail. I have been looking on other websites with no results. I am using a sketch by sparkfun.

Would you like to see the code i am using?

I figured it out. The arduino was on com one and the ide said com5. I switched the arduino to com5 and it worked.

Thanks.