+ Reply to Thread
Results 1 to 8 of 8

Runtime error 1004 when running excel macro. Other users do not have same issue with file

  1. #1
    Registered User
    Join Date
    08-21-2017
    Location
    San Francsico
    MS-Off Ver
    MS Office 2010
    Posts
    5

    Runtime error 1004 when running excel macro. Other users do not have same issue with file

    Hi everyone,

    I am running into an issue with a file in Excel that when I try to run a macro. I get the following error:

    "Run-time error '1004': Cannot run the macro 'modpaste.copy'. The macro may not be available in this workbook or all macros may be disabled."

    A couple things to note:
    - I just joined this company and I am using OneDrive to access and open the file
    - Other users do not have a problem running the macro in the file
    - I definitely have macros enabled

    I don't see a macro named modpaste.copy anywhere in the different modules in VBA. I think this is some kind of access issue because no one else had the same issue.

    Please help!

    Noah

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Runtime error 1004 when running excel macro. Other users do not have same issue with f

    If you are getting a 1004 error, you are apparently calling the macro from code. Please post the portion of code where the macro is called. Also, ensure that your system is mapped to the OneDrive directory that you use to access the file.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Registered User
    Join Date
    08-21-2017
    Location
    San Francsico
    MS-Off Ver
    MS Office 2010
    Posts
    5

    Re: Runtime error 1004 when running excel macro. Other users do not have same issue with f

    Hi JLG,

    THanks for the quick response. Here is the snippet of code where the macro trips up:

    Please Login or Register  to view this content.
    Can you explain what you mean by "ensure that your system is mapped to the OneDrive directory that you use to access the file"? I am able to open and save files onto the OneDrive folders I have synced to my computer if that is what you mean.

  4. #4
    Valued Forum Contributor
    Join Date
    11-26-2012
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    419

    Re: Runtime error 1004 when running excel macro. Other users do not have same issue with f

    One possibility is that you are missing an Add-in. Have a look at the Add-ins tab in Excel on your computer, and a colleagues, and see if they have something there that you don't.

  5. #5
    Registered User
    Join Date
    08-21-2017
    Location
    San Francsico
    MS-Off Ver
    MS Office 2010
    Posts
    5

    Re: Runtime error 1004 when running excel macro. Other users do not have same issue with f

    We all have the same add-ins, so that's not the issue.

  6. #6
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Runtime error 1004 when running excel macro. Other users do not have same issue with f

    I am surprised that you did not get a error message when you developed the "modPaste.Copy" macro. The period should have thrown an error. Try removing the period in both the code and the macro name and see if you still have the problem. The macro name can use underscore and dash to tie the words or simply concatenate them without a space, but periods are edited by the compiler to mean end of statement or expect a valid property.
    Last edited by JLGWhiz; 11-07-2018 at 08:54 PM.

  7. #7
    Registered User
    Join Date
    08-21-2017
    Location
    San Francsico
    MS-Off Ver
    MS Office 2010
    Posts
    5

    Re: Runtime error 1004 when running excel macro. Other users do not have same issue with f

    The problem is that I did not develop it. The person who did left the company and I don't see any modules in VBA that show what exactly that code does.

  8. #8
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Runtime error 1004 when running excel macro. Other users do not have same issue with f

    Quote Originally Posted by macronewbie99 View Post
    The problem is that I did not develop it. The person who did left the company and I don't see any modules in VBA that show what exactly that code does.
    You might be able to find the code by using the F8 function key to step through the procedure one line at a time with the vb editor open. I don't have any other thoghts on it.
    Regards, JLG

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Runtime error 438 when running windows build macro in excel MAC
    By JanJaapve in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-20-2015, 08:28 AM
  2. Copy and Pasting Issue (Runtime error '1004')
    By kinseld5 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-06-2013, 08:26 AM
  3. Runtime error 1004 using macro in excel 2007
    By CrazyHorse in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-03-2011, 11:54 AM
  4. Excel 2007 pivot table/macro/Runtime error 1004
    By abalserv in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-01-2010, 06:36 AM
  5. Pivot Table runtime 1004 Error for certain users
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-13-2010, 05:11 PM
  6. File Name Causes Runtime Error 1004
    By Robert in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-10-2005, 10:55 AM
  7. [SOLVED] Excel 2003 Macro Error - Runtime error 1004
    By Cow in forum Excel General
    Replies: 2
    Last Post: 06-07-2005, 09:05 AM

Tags for this Thread

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