Results 1 to 4 of 4

Thread: ?Excel: How to SaveAs workbook as SHARED?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    May 2004
    Location
    Carlisle, PA
    Posts
    1,045

    Resolved ?Excel: How to SaveAs workbook as SHARED?

    Esteemed Forum Participants and Lurkers:

    I have a requirement to save a set of macro generated Excel single-sheet workbooks as SHARED workbooks. I don't have any problem at all saving the required files ... I just don't know how to set the SHARED property.

    Here is what I have so far:
    ActiveWorkbook.SaveAs _
    fileName:=myPath & myName, _
    FileFormat:=xlNormal, _
    Password:="", _
    WriteResPassword:="", _
    ReadOnlyRecommended:=False, _
    CreateBackup:=False

    I tried to record a macro to save a SHARED file, but this is not allowed. The macro gets closed and does not reveal any information about saving as Shared. I of course rummaged throug my reference books and did a search on this forum, all to no avail.

    Thank you for any and all comments, suggestions, and
    assistance.
    Last edited by Webtest; Oct 11th, 2004 at 10:34 AM.
    Blessings in abundance,
    All the Best,
    & ENJOY!

    Art . . . . Carlisle, PA . . USA

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    To save a workbook as a shared workbook.

    VB Code:
    1. [i]expression[/i].SaveAs(FileName, FileFormat, Password, WriteResPassword, ReadOnlyRecommended, CreateBackup, [b]AccessMode[/b], ConflictResolution, AddToMru, TextCodepage, TextVisualLayout, Local)
    2.  
    3. [b]AccessMode[/b]   optional XlSaveAsAccessMode.
    4.  
    5. XlSaveAsAccessMode can be one of these XlSaveAsAccessMode constants.
    6. xlExclusive (exclusive mode)
    7. xlNoChange default (dont change the access mode)
    8. xlShared (share list)
    9. If this argument is omitted, the access mode isnt changed. This
    10. argument is ignored if you save a shared list without changing
    11. the file name. To change the access mode, use the ExclusiveAccess method.
    12.  
    13. Example:
    14. Workbooks("Book1.xls").SaveAs "C:\MySharedWorkBook.xls", , , , , , xlShared
    HTH
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    May 2004
    Location
    Carlisle, PA
    Posts
    1,045
    Thanks RobDog ...

    I don't know how I missed that in the Help Heap. I guess I read it too quickly.
    Blessings in abundance,
    All the Best,
    & ENJOY!

    Art . . . . Carlisle, PA . . USA

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    No prob.

    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width