Excel VBA: Getting error 1004 using APPLICATION.RUN to run a macro

    
I'm getting a 1004 error when my ADDIN tries to launch a macro already in a workbook .
The macro resides in a workbook (on disk before it was opened in this session) and the addin opened the workbook, updated some data fields in spreasheets in the workbook and now is trying to cause the macro, already in that workbook, to execute as though
the user had opened the workbook, made the changes, and clicked the button connected to that macro.  What the addin copied into the workbook was data in cells that the macro uses for inputs to its calcualtions.
The error reads: "The macro may not be available in this workbook or all macros may be disabled"
The command in question is in an ADDIN and its code is effectively:
v2="Taxplan Template 1.17.xlsm!SUMMARIZEYEAR
Application.run v2
...etc
Immediately upon executing "Application.run " it jumps to the on error location.
Taxplan Template 1.17.xlsm is open and accessible (the addin has just copied data into it and the macro is to update a summary based on that updated data) and it contains the macro Summarizeyear which has no arguments and is not private. 
If I set a breakpoint in the addin right before the "Application.run", stop the addin and manually run the macro it works fine.  It begins like:
Sub SummarizeYear()
Sheets("Summary").Select
...etc
If I manually open the workbook  Taxplan Template 1.17 I can run the macro SUMMARIZEYEAR without issue.
Macros are enabled in Excel.
Probably not pertinent but I've used the same style of code with .xls workbooks in the past without a hitch, this is the first instance where I used it with .xlsm format workbooks.
Excel 2007 SP3
Thanks

I'm getting a 1004 error when my ADDIN tries to launch a macro already in a workbook .
The macro resides in a workbook (on disk before it was opened in this session) and the addin opened the workbook, updated some data fields in spreasheets in the workbook and now is trying to cause the macro, already in that workbook, to execute as though
the user had opened the workbook, made the changes, and clicked the button connected to that macro.  What the addin copied into the workbook was data in cells that the macro uses for inputs to its calcualtions.
The error reads: "The macro may not be available in this workbook or all macros may be disabled"
The command in question is in an ADDIN and its code is effectively:
v2="Taxplan Template 1.17.xlsm!SUMMARIZEYEAR
Application.run v2
...etc
Immediately upon executing "Application.run " it jumps to the on error location.
Taxplan Template 1.17.xlsm is open and accessible (the addin has just copied data into it and the macro is to update a summary based on that updated data) and it contains the macro Summarizeyear which has no arguments and is not private. 
If I set a breakpoint in the addin right before the "Application.run", stop the addin and manually run the macro it works fine.  It begins like:
Sub SummarizeYear()
Sheets("Summary").Select
...etc
If I manually open the workbook  Taxplan Template 1.17 I can run the macro SUMMARIZEYEAR without issue.
Macros are enabled in Excel.
Probably not pertinent but I've used the same style of code with .xls workbooks in the past without a hitch, this is the first instance where I used it with .xlsm format workbooks.
Excel 2007 SP3
Thanks
This line is not quite correct,
v2="Taxplan Template 1.17.xlsm!SUMMARIZEYEAR
it is missing the closing double quote, also since your file name contains a space, I would also enclose it in single quotes.

Similar Messages

  • Installing cs6 on a new laptop, I get error message "Adobe application manager failed to install"

    installing cs6 on a new laptop, I get error message "Adobe application manager failed to install"
    Is this because I need to deactivate cs5 on one of the computers?
    CS5 is on 2 old computers. I used Migration Assistant to migrate the applications to the new laptop which is a 3rd computer.
    What do I need to do?

    I used Migration Assistant to migrate the applications to the new laptop which is a 3rd computer.
    Forget that part. The apps won't work. Adobe apps must be installed properly. That may well explain your issues with CS6, too. Generalyl, though, there is no need to uninstall older versions...
    Mylenium

  • My CC update keeps failing on error code 205. I have retried several times and it keeps going to error. I have tried to uninstall CC but I get error that previous update is still running.

    My CC update keeps failing on error code 205. I have retried several times and it keeps going to error. I have tried to uninstall CC but I get error that previous update is still running.:

    Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6
    Adobe CC 2014 Direct Download Links: Creative Cloud 2014 Release | ProDesignTools

  • When I down load the file i get (error 1004 please try again)

    when I down load the file i get (error 1004 please try again)

    Try this first. Go to Settings>Safari>Clear History, Cookies and Cache (or Data if you are running iOS 5). Restart the iPad. Hold the sleep button until the red slider appears and slide to shut down. Hold the sleep button until the Apple logo appears to power up.
    If that doesn't work, look here for more help.
    http://support.apple.com/kb/TS3694#error1004

  • Cant install Itunes on my work computer, get error message Apple Application support not found, so i uninstall and reinstall again and its the same message

    cant install Itunes on my work computer, get error message: "Apple Application support not found, so i uninstall and reinstall again and its the same message

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    The section Install missing components has advice on breaking down the iTunes installer into the individual .msi files which might prove useful if AAS won't install normally.
    tt2

  • I got my iphone4 yesterday and when I try to get any apps from apps store I keep getting error 1004 please try later please help th iPhone is brand new!

    I got my iphone4 yesterday and when I try to get any apps from apps store I keep getting error 1004 please try later please help th iPhone is brand new!

    mandyfromhull wrote:
    I got my iphone4 yesterday and when I try to get any apps from apps store I keep getting error 1004 please try later please help th iPhone is brand new!
    Try this link to fix your problem.
    http://forums.macrumors.com/showthread.php?t=949246

  • Why do i get error 1004 when trying to get ringtone?

    why do i get error 1004 when trying to buy song(ringtone) on my iphone

    Read this
    Error 1004 and 1013: These errors may be the result of the connection to gs.apple.com being redirected or blocked. Follow these steps to resolve these errors:
    Check security software. Ensure that communication to gs.apple.com is allowed. Follow this article for assistance with security software. iTunes for Windows: Troubleshooting security software issues.
    Check the hosts file. The restore will fail if there is an active entry to redirect gs.apple.com. Follow iTunes: Advanced iTunes Store troubleshooting to edit the hosts file or revert to default on Windows. See section "Blocked by configuration: (Mac OS X/Windows) > Rebuild network information".
    Try to restore from another known-good computer and network.
    If the errors persist on another computer, the device may need service.

  • Getting error while using HTTP connector and calling POST action to a Web API which is deployed as website on Azure

    I have create Logic App under Azure App Services, I am getting
    error while using HTTP connector and calling POST action to a Web API which is deployed as website on Azure.
    Following are the screen shots:
    Login App Connector Diagram:
    hema

    Marking as answered since no response on request for more information - assuming that you found what was wrong in the inputs. Let us know if you're still having trouble.
    http://twitter.com/joshtwist

  • When downloading an app I keep getting error 1004?w

    Why do I get error 1004 when downloading an apple store app?

    You can read about it here.
    http://support.apple.com/kb/TS3694#error1004
    I copied this from a thread the other day and this poster claimed that this worked for him...
    This actually has a very simple fix, that has worked all the times I have seen it.   Simple go to Settings > Safari >  Then reset the cookies, Reset the Cache, and Reset the History.  Now turn the iPad off and then on again.  It should work fine now.

  • HT6114 When trying to download Mavericks,I keep getting "Error 1004" try again later-

    I keep getting "Error 1004 please try again" when I try to download Mavericks...HELP!

    Please take each of the following steps that you haven't already tried. Stop when the problem is resolved.
    Step 1
    Open LaunchPad and find the icon of the app you're trying to install. There will be a small progress bar below it. Click the "X" to stop the download.
    Step 2
    Select
    Store ▹ View My Account
    from the App Store menu bar, then select View hidden purchases. Stop or resume the download.
    Step 3
    Sign out of the App Store and sign back in.
    Step 4
    Uninstall the app you're trying to update and reinstall it from your Purchases list.
    If you get this far without success, please post your results.

  • TS3694 i am getting error 1004 what is that

    i am i just buy from apple store the softwer apdated but i am getting error 1004 i just dont know waht is that

    For Error 1004, look at the solution in this similar post.
    https://discussions.apple.com/message/16228784
     Cheers, Tom

  • When try to download apps from ipod keep getting error 1004, change password 2 days ago dont know if that why problem occur can someone help

    When try ti down load apps from Ipod keep getting error 1004 how can I download ?

    http://support.apple.com/kb/TS3694#error1004
    There have been some problems accessing pages on the Apple web site.  If the hyperlink gives you a "We're sorry" message, try again.

  • When I try to download a free book from itunes, I get error 1004. What does this mean?

    When I try to download free books from itines book store, I get Error 1004. Can someone help please. I can download books that I pay for without any problems.

    Try the 'solutions' mentioned from this post onwards https://discussions.apple.com/message/15652754#15652754 - different things appear to have worked for different people.

  • I keep getting error 1004 on my iphone 3GS how do i clear this?

    I keep getting error 1004 on the iphone 3GS - how do I clear this?

    Yep Settings> Store....tap the ID...log out and then sign back in again.
    I had to de authorise my computers when I bought my new iMac so I'm guessing my Iphone needed to just sign in again to authorise the device on my itunes ID.

  • HT203421 why do i get error 1004 when trying to download mountain lion software?

    why do i get error 1004 when trying to download mountain lion software?

    Read this
    Error 1004 and 1013: These errors may be the result of the connection to gs.apple.com being redirected or blocked. Follow these steps to resolve these errors:
    Check security software. Ensure that communication to gs.apple.com is allowed. Follow this article for assistance with security software. iTunes for Windows: Troubleshooting security software issues.
    Check the hosts file. The restore will fail if there is an active entry to redirect gs.apple.com. Follow iTunes: Advanced iTunes Store troubleshooting to edit the hosts file or revert to default on Windows. See section "Blocked by configuration: (Mac OS X/Windows) > Rebuild network information".
    Try to restore from another known-good computer and network.
    If the errors persist on another computer, the device may need service.

Maybe you are looking for

  • How to permit multiple workspaces to access the same schema?

    Hello, When creating a new workspace (version 3.2), I am getting the following warnings: "Warning: The requested schema already exists. Warning: The requested schema is already assigned to one or more workspaces. Please ensure that giving multiple wo

  • What causes the digital fax error to keep popping up on the touch scree

    HP officejet pro 8500 wireless, the error message is digital fax error , what would cause that, Thanks Ted

  • Very imp  outline agreements.

    hi experts, 1)in which type of outline agreement does the price updates in info record . 2)i created a  quantity contract and created a pur order with reference to contract, now i want to see how much quantity is still left in the contract target qua

  • Problem installing archlinux on macbook pro retina

    Currently i don't have ethernet cable but i would like to install archlinux on my macbook machine. I face a problem that i will need to install broadcom-wl or broadcom-wl-dkms,  on either case i will need linux-headers for that kernel which seems mis

  • IView title bar remove "Remove" option

    Hi, In EP5 how to remove iView title bar "Remove option", in the java iview >> Look >> Title bar "Remove Button" is grayed out?  How to disable this option? Thanks Siva