locked
Macro MsgBox not found? RRS feed

  • Question

  • Excel 2003  VBA

    I am surely just entering the line of code wrong

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

    ' Error:  The Macro "C:\$MyStuff\Excel\mysheet.xls'!Application.MsgBox' cannot be found

    a built in routine not a macro? 

    how do I properly address it?

    thanks


    • Edited by dekaya2 Friday, June 22, 2018 10:36 PM
    • Moved by Stanly Fan Monday, June 25, 2018 3:18 AM Excel related
    Friday, June 22, 2018 10:34 PM

All replies

  • Hi dekaya2,

    According to your description, your issue is more related about MS Office problem. And this forum is discussing and asking questions about the Windows Form and ClickOnce, I will move this thread to corresponding forum: Excel for Developers Forum for dedicated information.

    Thank you for your understanding.

    Regards,

    Frankie


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, June 25, 2018 2:47 AM
  • Hello dekaya2,

    Please try the code like.

    Sub TEST()
    Application.OnTime Now + TimeValue("00:00:05"), "ApplicationMsgBox"
    End Sub
    
    Sub ApplicationMsgBox()
    MsgBox "Called by OnTime"
    End Sub

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, June 25, 2018 3:21 AM