How to solve macro cannot be found VBA

I made a vba to run through a few macros in a sequence.

I assigned a button to a macro which will start the sequence.

Sub mixerStarter()

Call PrimaryDataGet
Application.Wait (Now + TimeValue("0:00:05"))
Call ValueSetter
Application.Wait (Now + TimeValue("0:00:03"))
Call dataShift
Application.Wait (Now + TimeValue("0:00:03"))

Application.OnTime Now + TimeValue("00:01:00"), "mixerMiddle()"

End Sub


Sub mixerMiddle()
Call PrimaryDataGet
Application.Wait (Now + TimeValue("0:00:05"))
Call dataShift
Application.Wait (Now + TimeValue("0:00:03"))
End sub

The mixerStarter runs perfectly but as soon as it hits mixerMiddle I get an error message saying

Error message

All macros are in module 1

As a recommendation from another question of a similar nature, I deleted all underscores from the names of my macros

What to do ?

Upvotes: 1

Views: 312

Answers (1)

JMP
JMP

Reputation: 4467

The procedure in OnTime doesn't take brackets, so use:

Application.OnTime Now + TimeValue("00:01:00"), "mixerMiddle"

instead.

Ref:

Upvotes: 3

Related Questions