Taking the back wheel off will not affect the gears.
When you replace the wheel put the chain on any gear and turn the pedal a few times. The gear selector will find the right gear.
Big Softy, January 2007
edit
I can answer this question...
replace an intertube on a rear tire multi speed bike?