An adjusting device having a first element and a second element movably mounted with respect thereto, wherein the first element has at least one latching device, and wherein at least one locking element coupled to an actuating element is movably disposed on the second element and can be moved out of a release position out of engagement with the latching device into a locking position in engagement with the latching device. The adjusting device has a simple construction which functions reliably and enables rapid adjustment of the stop position. The actuating element has at least one actuating magnet, which is associated with a locking magnet coupled to the locking element and the locking element moves into the release position and/or locking position and/or out of the release position and/or locking position.