+ Reply to Thread
Results 1 to 3 of 3

Macro not working correctly on different computer?

  1. #1
    Forum Contributor
    Join Date
    12-29-2012
    Location
    usa
    MS-Off Ver
    Excel 2016
    Posts
    325

    Macro not working correctly on different computer?

    So I originally have a macro setup to distribute to other users that will open up a local file on a share drive, copy a vba module from that workbook, and paste it into the user's workbook. That macro works correctly after I had to make sure the users adjust their trust center settings to "Trust access to the VBA project object model."

    Now I am running into a second issue when the users execute the macro that was copied into their file. The macro that was copied into their file executes upon saving their file and it pretty much creates a text file of their document. The code is below:

    Please Login or Register  to view this content.
    So there's 4 parts to this code:

    1.) Removes any #REF errors from the tab
    2.) Fills each column to the length of another column in a different tab
    3.) Removes any zero amounts in two columns
    4.) Creates a new workbook and copies this tab over to that new workbook. Then it filters for any blanks and removes those rows (this is necessary because some cells might have had formulas in them even though they were blank and copying and pasting as values doesn't "truly" make these cells blank). Then it saves the file as a text file

    Now when I run the code on my computer, it runs correctly. However, when another user was testing this process, the text file created copied down the first row multiple times. Is there anything in my code that might signal why this would happen? Because the original tab in this person's file matches mine, but the text file created is different which does not make sense to me?

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Macro not working correctly on different computer?

    Is it possible that the Worksheets "Data Input" are not identical? If they were not, the value of EndRow could be different.

    As a side note, you declared string variables named 'Path' and 'Name' but never gave them a value. Since both words have specific meaning in VBA, they may cause other problems...

  3. #3
    Valued Forum Contributor
    Join Date
    09-19-2008
    Location
    It varies ...
    MS-Off Ver
    Office365 - 64bit
    Posts
    862

    Re: Macro not working correctly on different computer?

    Also - why are you autofilling one column at a time? This will do the same thing ..

    Please Login or Register  to view this content.
    MatrixMan.
    --------------------------------------
    If this - or any - reply helps you, remember to say thanks by clicking on *Add Reputation.
    If your issue is now resolved, remember to mark as solved - click Thread Tools at top right of thread.

+ 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. macro not working on coworker computer
    By clammastak in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-06-2015, 05:57 PM
  2. Macro not working correctly
    By erict in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-30-2010, 10:11 AM
  3. 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
  4. Macro not working correctly
    By Colin Vicary in forum Excel General
    Replies: 3
    Last Post: 02-21-2007, 04:48 PM
  5. Replies: 9
    Last Post: 08-21-2006, 02:50 PM
  6. 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
  7. 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

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