Macro Fails, 'The macro may not be available in this…'

后端 未结 3 547
小鲜肉
小鲜肉 2021-01-07 05:01

Hello and thank you in advance for your assistance.

I have some code that I admittedly borrowed from a site. It changes the sheet that is being displayed every X

3条回答
  •  既然无缘
    2021-01-07 05:03

    Try to put your timer in a global variable and add it each time you run the function, also configure OnTime to be schedulable

    Global tmrTimer1
    
    Sub displaysheets()
         tmrTimer1 = Now + TimeValue("00:00:03")
         'Enable the schedule
         Application.OnTime tmrTimer1 , "displaysheets", , True
    End Sub
    

提交回复
热议问题