Can I connect the Arduino Micro to both USB (PC) and 5V battery pack?

I need to power on the arduino micro, to set some parameters and then to disconnect the USB cable. At this point, Arduino must stay powered on.

Is it possible?

Yes

Thank you very much!