+ Reply to Thread
Results 1 to 3 of 3

Runmacro action was canceled error

  1. #1
    Registered User
    Join Date
    08-14-2009
    Location
    Seattle
    MS-Off Ver
    Excel 2003
    Posts
    2

    Runmacro action was canceled error

    I wasn't able to schedule a macro using the windows scheduler. When I schedule it, I get an error saying 'RunMacro was canceled'. Below is the macro converted to VB. Any help or comments is greatly appreciated. The same macro runs fine in access 2003 but not in access 2007. Thanks in advance.

    And are there anyway to automatically schedule this VB using windows scheduler?




    Option Compare Database

    '------------------------------------------------------------
    ' Pub_Emails_Load_Macro
    '
    '------------------------------------------------------------
    Function Pub_Emails_Load_Macro()
    On Error GoTo Pub_Emails_Load_Macro_Err

    DoCmd.SingleStep
    DoCmd.SetWarnings False
    DoCmd.OpenQuery "Delete Query", acViewNormal, acEdit
    DoCmd.Close acQuery, "Delete Query"
    DoCmd.SetWarnings True
    DoCmd.Quit acExit


    Pub_Emails_Load_Macro_Exit:
    Exit Function

    Pub_Emails_Load_Macro_Err:
    MsgBox Error$
    Resume Pub_Emails_Load_Macro_Exit

    End Function

  2. #2
    Registered User
    Join Date
    08-14-2009
    Location
    Seattle
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Runmacro action was canceled error

    I wasn't able to schedule a macro using the windows scheduler. When I schedule it, I get an error saying 'RunMacro was canceled'. Below is the macro converted to VB. Any help or comments is greatly appreciated. The same macro runs fine in access 2003 but not in access 2007. Thanks in advance.

    And are there anyway to automatically schedule this VB using windows scheduler? Code in code tags below.


    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-14-2007
    Location
    Ontario
    Posts
    19

    Re: Runmacro action was canceled error

    Your macro doesn't open, or specify a file. Your asking it to run a delete qury.
    Where is it suppose to get that delete query from?

    Ask yourself this, if you were sitting at your idle computer, and someone said, "run the delete query" what would you have to do? You would have to open up access. Open the database that you have your data and delete query in. Then you would have to run the query. Your Macro was designed inside access so it's assumed that it will only run within the access environment. Windows can't possible know which program or file "delete query" belongs to.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1