+ Reply to Thread
Results 1 to 8 of 8

Code presents error on shared file in teams

  1. #1
    Forum Contributor
    Join Date
    04-07-2020
    Location
    New Zealand
    MS-Off Ver
    365
    Posts
    219

    Code presents error on shared file in teams

    Hi Guys

    I have a weird scenario which I cannot seem to figure out, maybe I am not seeing the problem. The code below is to copy values from multiple cells in a template to a Summary table on a different sheet in the same work work.

    the excel file was created on my PC and I uploaded the file in teams for the rest of our department to work off/on. Firstly I had to set the Macro settings on every one's PC so there would not be any trust issues or disablement of macro _ Bear In Mind Not all of our team is experts in VBA, nir am for that matter....lol

    Anyway this code works absolutely 100% on my PC and on one of the other team mates PC as well. But for some reason when a particuler team mate works on the file and clicks the command button I get a error from the code

    the debug highlights the following issues

    Sub Submit_AuditSheet_Data() and says that there is a issue with this line of code


    lrow = ws_to.Cells(Rows.Count, "A").End(xlUp).Row

    That is impossible as mentioned it works fine on my PC and second, the previous row is nit blank

    Any idea why this is happening or is there a Options setting causing this ?


    S
    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Code presents error on shared file in teams

    What is the error description?
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    04-07-2020
    Location
    New Zealand
    MS-Off Ver
    365
    Posts
    219

    Re: Code presents error on shared file in teams

    Hi AlphaFrog - If not mistaken (I did this remotely with screen share) it said something along the of Property / method that could not be executed

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Code presents error on shared file in teams

    I really don't have a clue. What versions of Windows and Excel does the teammate with the error have?

  5. #5
    Forum Contributor
    Join Date
    04-07-2020
    Location
    New Zealand
    MS-Off Ver
    365
    Posts
    219

    Re: Code presents error on shared file in teams

    exactly the same as mine office 365 pro plus, what is also weird is as mentioned, a different team mate had the same problem, I teamed shared with him opened the file , selected - enable micros and trust , when into the trust center setting - enable macros - and his worked fine. I did the same with her's, but still get that error

    I also closed the file on her PC and saved it back to our teams files, opened the same file on my end, and without making any changes, clicked the command button and it did what it needed to do - So there is relay nothing wrong with the code

    One of my old clients had the same issue - I mailed him the file to worked from (so its not a teams issue) when he opened it same thing

  6. #6
    Forum Contributor
    Join Date
    04-07-2020
    Location
    New Zealand
    MS-Off Ver
    365
    Posts
    219

    Re: Code presents error on shared file in teams

    Hi - any idea where I can start looking for the problem here

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,480

    Re: Code presents error on shared file in teams

    I've shared VBA enabled WBs via Teams for the first time this year and had no problems with the WB residing in the team's file directory. I have this drive synched to my desktop with no issues.

    Sorry - this doesn't really help except to eliminate Teams as the root of the problem, confirming your thoughts.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  8. #8
    Forum Contributor
    Join Date
    04-07-2020
    Location
    New Zealand
    MS-Off Ver
    365
    Posts
    219

    Re: Code presents error on shared file in teams

    Thanks Ali

    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. [SOLVED] Excel Macro throwing Runtime error 5 when file is shared!
    By murali.a.89 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-14-2019, 01:56 AM
  2. Shared File Causing 1004 Error
    By cmore in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2014, 11:07 PM
  3. VBA code to open protected shared file
    By Deredrum in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-05-2013, 09:29 AM
  4. VBA Code To Copy A File in the shared drive to a user desktop
    By FLani in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-08-2013, 01:29 AM
  5. Problems with VBA code when file is shared
    By mhni in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-14-2009, 04:23 PM
  6. VB Code Works Perfect...but Not when the File is Shared
    By TEAM in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-15-2005, 11:55 AM
  7. Macro error when file is shared
    By Eric @ SEASH, Evansville in forum Excel General
    Replies: 2
    Last Post: 08-24-2005, 11: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