excel 2003 - OnTime method doesn't work

Joined
Jan 27, 2009
Messages
1
Reaction score
0
Hello
first of all, i'm a newbie programmer in VB (but not in general).
here's what i did:
opened a new excel workbook, went to: Tools >> Macro >> Visual Basic editor,
and started to write the script.

i have this code:

Sub Workbook_Open()
Application.OnTime EarliestTime:=Now + TimeValue("00:00:03"), procedure:="doSomething"
End Sub

Sub doSomething()
MsgBox "hello there!"
End Sub

now, when the workbook opens, and 3 seconds elapses, i see this message:
"The macro 'I:\myFolder\myFile.xls'!doSomething was not found"

(since my office version isn't English, the best translation i could find for the last part of the error message is "was not found")

why do i get this error message?

thanks in advance
 

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

Back
Top