Outlook VBA reference to Excel for Ontime function

Joined
Apr 28, 2009
Messages
1
Reaction score
0
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top