+ Reply to Thread
Results 1 to 15 of 15

Macro on shared workbook

  1. #1
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2013, 2019 & O365
    Posts
    214

    Macro on shared workbook

    Hi All!

    Can anyone plz tell me tht how to write or record macro on a shared workbook?

    1st I had to keep the workbook unshared, then I recorded, checked then made again 'shared workbook', then checked my macro. The macro is working fine, but plz tell me is this method fine or have some risk? ..I would like to be know the other ways of making macros for a shared workbook, plz help!

    Thanks in Advance!
    Last edited by SunOffice; 09-10-2010 at 04:57 AM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: How to write or record macro on a shared workbook?

    You can not change/edit/write/record macros in a shared workbook. The only way is to unshare the workbook, create/edit your macros, then share the workbook again.

    After that, sit back and wait for the workbook to start acting funny, losing settings, losing data, throwing errors.

    This will eventually occur.

    Avoid shared workbooks.

  3. #3
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2013, 2019 & O365
    Posts
    214

    Re: How to write or record macro on a shared workbook?

    Thanks alot teylyn!!

    OMG...!! If I may lose data, settings, etc. too on the shared workbook mode, then it is so weired?? :O

    Wht If we protect the worksheet so tht no-one can edit/delete/insert cells/ column/ rows? then will it work safely?

    actually I have to make a macro program on a shared workbook for the team.

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Macro on shared workbook

    What would be the point of sharing the workbook if the users can't edit it?
    Remember what the dormouse said
    Feed your head

  5. #5
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2013, 2019 & O365
    Posts
    214

    Re: Macro on shared workbook

    ..hehe! idk

  6. #6
    Registered User
    Join Date
    09-01-2010
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Macro on shared workbook

    To get around this problem I use a personal.xls copied into all the XLSTART folders on the applicable machines.

    This way all the machines have the macros and can use them without things going funky.

    Users can always open the workbook, make changes, save and then someone else can then open it... Not sure if that solves your problem though.

  7. #7
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2013, 2019 & O365
    Posts
    214

    Re: Macro on shared workbook

    Thanks for replying fren!

    you mean to save a personal copy of the macro-enabled workbook or want me to make another worksheet in the shared workbook, then do coding?

    Where should I keep a copy of the codes in every user's machine? We work on a share-point so everything is access-able for every teammate. Do I have to rename for everyone?

  8. #8
    Registered User
    Join Date
    09-01-2010
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Macro on shared workbook

    When you open Excel, the program automatically opens all files that are in the XLSTART directory.

    IF you create a workbook, with all your code in it, hide it and then put it in the XLSTART directory, your code will be available over all your workbooks.

    Put copies of this code workbook in everyone's individual XLSTART directories and they will have access to the macros.

    As mentioned above, shared workbooks are a bit screwy, so try and stay away from them.
    Last edited by tenk283; 09-10-2010 at 05:22 AM.

  9. #9
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2013, 2019 & O365
    Posts
    214

    Re: Macro on shared workbook

    You mean to C:\Program Files\Microsoft Office\OFFICE11\XLSTART (folder) ??

    I've got some knowledge frm below link:
    http://www.bettersolutions.com/excel/EHN113/QA748890521.htm

    Locate the following folder:

    * Excel 2007:
    C:\Program Files\Microsoft Office\OFFICE12\XLSTART
    * Excel 2003:
    C:\Program Files\Microsoft Office\OFFICE11\XLSTART

    ..but in my PC this XLSTART folder is empty.
    Last edited by SunOffice; 09-11-2010 at 08:43 PM.

  10. #10
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Macro on shared workbook

    Yeah, well, if those folders are empty, then that just means that currently no files are automatically opened when you start Excel. If you save/copy a file to this folder, then it will be opened when Excel is started.

    I'm not sure I'd be happy with distributing a file to a group of people, hoping they will put it in the correct XLSTART folder, though. It will be a maintenance nightmare.

    If you need an application that supports simultaneous edit access by multiple users, Excel is not the right tool. You should be looking into a database solution instead.

  11. #11
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Macro on shared workbook

    If you want to distribute an Excel-file, containing macros, that you want to be stored in the xlstart-folder on the recipients system you could use:

    Please Login or Register  to view this content.
    Last edited by snb; 09-12-2010 at 06:53 AM.



  12. #12
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2013, 2019 & O365
    Posts
    214

    Question Re: Macro on shared workbook

    Thanks alot Mr. teylyn and snb

    ...but if u can check out below attached workbook for an example, then wher should I paste/ write the given codes in the workbook, before placing in the every teammates PC's XLSTART folder directory?

    (Can I keep protected Macro codes, then put the workbook in the XLSTART folder directory?)

    Plz put some light on it for me...

    Thanks in Advance!
    Attached Files Attached Files
    Last edited by SunOffice; 09-12-2010 at 11:31 AM.

  13. #13
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Macro on shared workbook

    Please Login or Register  to view this content.
    means: put this into the workbook module.

  14. #14
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2013, 2019 & O365
    Posts
    214

    Re: Macro on shared workbook

    ...now plz check in the workbook (ALT+11), and tell me if I am doing right? I've pasted ur codes just above mine. Can I hope it is ready to place in the XLSTART folder directory??
    Attached Files Attached Files

  15. #15
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2013, 2019 & O365
    Posts
    214

    Re: Macro on shared workbook

    Quote Originally Posted by teylyn View Post
    If you need an application that supports simultaneous edit access by multiple users, Excel is not the right tool. You should be looking into a database solution instead.
    You mean to Database Management System (DBMS)??

    Thanks for telling me, I'll sure start learning it too.
    Last edited by SunOffice; 09-12-2010 at 04:00 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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