It appears Docs are out of date for timer

https://documentation.xojo.com/topics/threading/running_code_periodically_with_a_timer.html
MyTimer.Mode = Timer.Modes.Multiple need to updated to
MyTimer.runMode = Timer.RunModes.multiple

AddHandler MyTimer.Action, AddressOf TimerAction
errors with

App.Run, line 5
Type mismatch error. Expected delegate Delegate( Timer ), but got delegate Delegate( )
AddHandler MyTimer.Action, AddressOf TimerAction
App.Run, line 5
This method requires fewer parameters than were passed
AddHandler MyTimer.Action, AddressOf TimerAction

please advise

Did you remember to copy the TimerAction method?

Sub TimerAction(sender As Timer)
  // This code works on iOS and uses MobileProgressBar.
  // Change the properties as appropriate for desktop apps.
  If ProgressBar1.Value < ProgressBar1.MaximumValue Then
    ProgressBar1.Value = ProgressBar1.Value + 1
  Else
    // Stop Timer and Remove the handler
    sender.Mode = Timer.Mode.Off
    RemoveHandler MyTimer.Action, AddressOf TimerAction
  End If
End Sub

In particular, you need to make sure the method you’re assigning to the event actually matches the event’s signature–including the hidden first parameter that refers to the timer itself (referred to as Sender in the example.)

So, this will work:

Sub TimerAction(sender As Timer)

But this will give you the error you’re encountering because it’s missing the hidden parameter:

Sub TimerAction()

Thanks for the fast reply.
yes I forgot the parameter sender As Timer

works as intended right now. the only change required in the docs is the “Modes” to “RunModes”

Best to add an item to the tracker:

https://tracker.xojo.com/xojoinc/xojo/-/issues

Hit the New issue button. Documentation items usually get sorted quite quickly.

If you need to login the details are the same as the forum.