Outlook VBA reference to Excel for Ontime function - TechRepublic
Question
April 28, 2009 at 10:12 AM
danhanson

Outlook VBA reference to Excel for Ontime function

by danhanson . Updated 17 years, 2 months ago

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

This discussion is locked

All Comments