+ Reply to Thread
Results 1 to 5 of 5

One user is receiving error when others are not within the macro

  1. #1
    Valued Forum Contributor
    Join Date
    05-15-2017
    Location
    US
    MS-Off Ver
    365
    Posts
    901

    One user is receiving error when others are not within the macro

    So we have reports for each of our teams. I have set them all up to automatically update for each of the teams by a simple press of a button within the report.
    I have one team that always gets an error and cannot update their report, BUT i can open the same file from the same location and it works for me.

    The file is located within our teams app, but we both open it from teams, we both open within the excel app(not teams viewer) and i can click the button and everything updates, but when they click the button the get the below error.

    The highlighted line is where the "debug" takes me when trying to test their file.

    Is there any improvements i can make to this area of the macro that would help? Is that line written the best it can be? Is there a better way to write that line?

    At the moment, i dont hava a file to upload because these reports are so involved, if i try to strip it clean to upload, it may not work at all and introduce new errors..

    right now just looking to see if there is anyway to improve this portion of the logic to test with that team.

    I can provide the whole routine code here:

    Please Login or Register  to view this content.
    Attached Images Attached Images
    If you find the suggestion or solution helpful, please consider adding reputation to the post.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: One user is receiving error when others are not within the macro

    Your screenshot does not match the code you posted. My comments below address the code you posted.

    The error means that either there is no open workbook named "ChangeRequests" or that the workbook has no sheet called "Page 1".

    You are instantiating a workbook object wb but then not taking full advantage of it. The most reliable change to the code will be

    Please Login or Register  to view this content.
    I think the reason they are getting the error is that you are referring to "ChangeRequests" instead of "ChangeRequests.xlsx". But I don't know why that would only cause an error for some people and not others. Does everyone have the same version of Excel?
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Valued Forum Contributor
    Join Date
    05-15-2017
    Location
    US
    MS-Off Ver
    365
    Posts
    901

    Re: One user is receiving error when others are not within the macro

    yea that was my poor attempt at changing names up and didnt realize, thats not the issue though..the name in the screen shot is the legit name and the code is my attempt at cleaning out actual names of files and such..

    but i will make the tweak on the wb line..

    And yes we are all using office365.

  4. #4
    Valued Forum Contributor
    Join Date
    05-15-2017
    Location
    US
    MS-Off Ver
    365
    Posts
    901

    Re: One user is receiving error when others are not within the macro

    well ill be

    the fix was the changing that to wb
    all this time i kept looking and looking and that never stood out as the problem.

    thank you

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: One user is receiving error when others are not within the macro

    You're welcome and thanks for the rep!

    If your question has been answered please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved. Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."

+ 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. Receiving 1004 error when saving file with macro I've used for over 2 years
    By VBA_Novice_VBA in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-08-2021, 09:27 PM
  2. [SOLVED] Receiving a Strange Error message when running macro
    By bigroo1958 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-03-2018, 04:16 PM
  3. Receiving 400 error
    By mklindquist0815 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-04-2016, 02:10 PM
  4. Receiving following error “Complie error : syntax error” Help
    By masond3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-02-2012, 10:19 AM
  5. receiving error for pastespecial - complex macro
    By katmison in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-26-2009, 05:11 PM
  6. Receiving Object Error
    By pawebb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-13-2007, 07:11 PM
  7. user defined function receiving a range as parameter
    By Marc in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-14-2005, 03: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