+ Reply to Thread
Results 1 to 5 of 5

macro doesn't work in shared file

  1. #1
    Registered User
    Join Date
    03-07-2017
    Location
    Guelph, Ontario
    MS-Off Ver
    2010
    Posts
    3

    macro doesn't work in shared file

    I have a macro that basically inserts a line (it's very simple), but for whatever reason, it won't work in a shared file, but does work when it's not a shared file. The line that won't work is Selection.Insert. Does that make sense to anyone? It gives "Run-time error '1004': Insert method of Range class failed". If anyone could shed light on this, I would appreciate it.

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: macro doesn't work in shared file

    Hi,

    In a shared workbook you can only insert entire rows or columns- are you trying to insert only part of a row or column?
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Registered User
    Join Date
    03-07-2017
    Location
    Guelph, Ontario
    MS-Off Ver
    2010
    Posts
    3

    Re: macro doesn't work in shared file

    Thank you. Yes, it's only part of a row. I can probably make it work with an entire row. Is that my best option (or maybe only one)?

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: macro doesn't work in shared file

    Your best option is not to use shared workbooks. If you must use them, then inserting an entire row is the most practical option- as it is simpler than unsharing, inserting cells and then re-sharing the workbook (the only other option).

  5. #5
    Registered User
    Join Date
    03-07-2017
    Location
    Guelph, Ontario
    MS-Off Ver
    2010
    Posts
    3

    Re: macro doesn't work in shared file

    ok, thanks a lot

+ 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. Old excel file with picture insert macro doesn't work properly...
    By rcurious in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-08-2014, 05:56 PM
  2. Timestamp Doesn't Work When Workbook Is Shared
    By Anaky in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-19-2014, 10:27 AM
  3. Edit Shared Work File
    By suhabthan in forum Excel General
    Replies: 1
    Last Post: 08-13-2014, 10:12 AM
  4. [SOLVED] Macro Doesn't Work Through Button, Does Work Through Developer ->Macros Option
    By freybe06 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-27-2013, 11:55 AM
  5. Replies: 0
    Last Post: 09-18-2012, 11:24 AM
  6. Macro doesn't work when shared
    By rasmus1166 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-10-2011, 10:00 AM
  7. Shared File doesn't exist
    By rvancura32 in forum Excel General
    Replies: 0
    Last Post: 02-09-2009, 01:19 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