+ Reply to Thread
Results 1 to 9 of 9

Macro only runs on my computer

  1. #1
    Registered User
    Join Date
    06-26-2008
    Location
    Rock Hill
    Posts
    41

    Macro only runs on my computer

    I wrote an Excel macro for use by others at work. It runs just fine on my computer, but when someone else tries to run it on their computer, they get error messages. Is there something that I am doing, or something that I can do to make it usable by anyone?

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Which version of Excel are you using, and which version are the others using?

    What's the extension of the file? .xlsx, .xlsm or .xls?

    What's the error message? Is it anything to do with macros being disabled?

    If the users are using versions of Excel pre-2007, Is there security setting set to high rather than medium? (Tools --> Macro -> Security)

    Rgds

  3. #3
    Registered User
    Join Date
    06-26-2008
    Location
    Rock Hill
    Posts
    41
    We are all using Excel 2003.
    The macro security is on the right settings, and the error message that they keep getting is 'Subscript out of Range'.
    I don't get it when I run it, but it happens when someone else does.
    The file extension is .xls.

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,016
    If they press Debug when the error occurs, what line is highlighted in the code?

  5. #5
    Registered User
    Join Date
    06-26-2008
    Location
    Rock Hill
    Posts
    41
    Please Login or Register  to view this content.
    Last edited by VBA Noob; 12-15-2008 at 02:06 PM. Reason: Added code tags

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,016
    Does it work if you change the code to:
    Please Login or Register  to view this content.

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    I suspect that you have your file browser set to hide extensions for known filetypes, which allows your syntax to work on your computer. Romperstomper's works for systems configured either way.
    Entia non sunt multiplicanda sine necessitate

  8. #8
    Registered User
    Join Date
    06-26-2008
    Location
    Rock Hill
    Posts
    41
    Thanks a lot. That was it!

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Would you please mark the thread as Solved?

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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