Codes can vary around the country in different municipalities. However, the usual height for safety with a gas burner is 22" minimum. Now, in your case you've mentioned something that makes me think you should make the distance a little higher. You mentioned in the "cabinet" that will house the microwave. Usually an over the range micro is hung on wall brackets. If your using a wooden shelf or a modified cabinet the higher the better up to a comfortable height for placing and removing items from the unit.
Dennis (cut2it)
C&onstructi&on C&onsultant
Over 40 yrs. as General Contractor for new const. & remodel - retired with time for you.