+ Reply to Thread
Results 1 to 6 of 6

macro not working on coworker computer

  1. #1
    Registered User
    Join Date
    05-04-2015
    Location
    Irvine, CA
    MS-Off Ver
    2010
    Posts
    37

    macro not working on coworker computer

    I am trying to build a macro for my department. The problem is, it works for my computer but not for my coworkers. She receives a "Subscript out of range" message. I am having issues pinpointing the problem since it works fine on my computer. My goal is to be able to send this file to any user and have them run the macro smoothly. I created the macro with a form control in the developer tab and built the script from there.

    Things that I've already checked for include:
    -same version of Excel
    -"Enable macros" is clicked
    -shared folder location is accurate (Since it pops open on mine as well)
    -Sheet name does exist (since it runs on mine)

    any help is appreciated. please see code below:

    Please Login or Register  to view this content.

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: macro not working on coworker computer

    Hi clammastak

    Check the VBA References...Alt F11--->Tools--->References on your machine and your co-workers machine. Add any missing References to your co-workers machine.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: macro not working on coworker computer

    Which line of code gives the error? when the message comes up, hit debug, which line is highlighted?

    Also, is it the only excel book open on their machine?
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  4. #4
    Registered User
    Join Date
    03-26-2014
    Location
    Nowhere, somewhere
    MS-Off Ver
    Excel 2007
    Posts
    75

    Re: macro not working on coworker computer

    To further Arkadi's comment about other open Workbooks, this line:
    Please Login or Register  to view this content.
    is a dangerous assumption for the code to make that the desired Workbook is at index 1. If it is not, then "Sheets("Sheet Name").Select" and "Sheets("table").Select" could fail.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: macro not working on coworker computer

    Does this work?
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  6. #6
    Registered User
    Join Date
    05-04-2015
    Location
    Irvine, CA
    MS-Off Ver
    2010
    Posts
    37

    Re: macro not working on coworker computer

    Thanks Norie. That one seemed to resolve the issue for another coworker, but I will test it out on the coworker with issue. Guess I need to get better at declaring variables...much appreciated

+ 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. Need help getting VBA working on new computer
    By seeigecannon in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 04-09-2014, 05:24 PM
  2. Macro stops working after copying to different computer
    By Bacat in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-07-2009, 04:33 PM
  3. Save as Macro working for one computer but not the other?
    By Infinity in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-29-2006, 05:30 AM
  4. Keyboard shortcut not working when I copy macro to another computer
    By telewats in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 01-09-2006, 04:55 PM
  5. [SOLVED] DB not working on other computer
    By lyndac in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 07-16-2005, 04:05 PM

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