The performance of systems that exhibit repetitive disturbances can be significantly improved using repetitive control. If the repetitive disturbance is periodic with respect to time, perfect asymptotic disturbance rejection can be achieved by well-known methods. However, many systems have a repetitive nature with respect to a variable other than time. For this type of systems, we propose a delay-varying repetitive control (DVRC) method, which employs a time-varying delay in the repetitive controller that is continuously adjusted based on the repetitive variable. An norm-based criterion is derived that guarantees stability of the time-varying delay system for a given range of variations of the repetitive delay. The strengths of this new repetitive control scheme are shown by applying it to a nanomotion stage driven by a walking piezo actuator.