intrigued_66
intrigued_66

Reputation: 17240

Application.ontime not working?

I am using this line of Application.Ontime:

Application.OnTime Now + TimeValue("00:00:05"), "'RefreshWorkbook'"

to re-call my sub declared using:

Public Sub RefreshWorkbook()

5 seconds later, but it does not work. Is there something I am doing wrong? The subroutine is in the "thisworkbook" module?

Upvotes: 0

Views: 2194

Answers (1)

prabhu
prabhu

Reputation: 84

Use Now + TimeValue(time) to schedule something to be run when a specific amount of time (counting from now) has elapsed. Use TimeValue(time) to schedule something to be run a specific time.

Upvotes: 3

Related Questions