Question Locked

Outlook VBA reference to Excel for Ontime function

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,
I am working on a macro in Outlook that will call another function called TestMacro at a specified time. I have manually set a reference to Excel, but now the macro gives me the error that it cannot find the procedure called "TestMacro", even though TestMacro sits in the same outlook module as "PlayOnTime". How can I reference the procedure called by Ontime so that it finds it within Outlook?

Sub PlayOnTime()
Excel.Application.OnTime Now + TimeValue("00:00:02"), "TestMacro"
End Sub

Thank you,
Dan

1 reply

This discussion is closed to new replies.