What is the procedure to climb and level off using a Bendix/King KAP140 autopilot?
Only the KAP140 two-axis autopilot with altitude preselect supports capturing a preselected altitude (which is the one installed in the Cessna 172 before the introduction of the Garmin GFC700)

Preselect the desired altitude using the altitude preselect knob, switch to VS mode, select the desired VS and the AP will switch to altitude hold mode when the preselected altitude is reached.

Taken from the manual.