+ Reply to Thread
Results 1 to 3 of 3

Open workbook on network

  1. #1
    Registered User
    Join Date
    12-13-2011
    Location
    Breda, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    9

    Open workbook on network

    Hi all,

    I have two workbooks on a network disk G:\

    G:\Mag\Inventory.xlsm
    G:\Mag\Reports.xlsm

    Both workbooks can be opened by more people at the same time, only the first who opens can save changes.

    Inventory.xlsm contains a macro which selects data and copies them to Reports. I have code that check whether the user who performs the action has the Reports workbook opened. But I do need code that checks whether any user in the network has the Reports workbook opened. If so, i need a popup to say which user has the workbook opened, since if that is so, all my code works but the copied data will not be saved in the destination workbook.

    Can anyone help me on this?
    Thanks.
    I posted the same problem on http://www.thecodecage.com/forumz/mi...post1054993587
    Sjors
    Last edited by sjors.hoevenaars; 02-05-2012 at 08:09 AM. Reason: Add cross-posting

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Open workbook on network

    Hello Sjors,

    The macro below will list shared files on Windows 2000, 2003, and XP. I don't think it will work Windows Vista or 2007, but you can give it a try. Change the variable "Comp" from "Server Name" to name of your server. If it works then we can move forward. If it does not then I will look for another solution.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    12-13-2011
    Location
    Breda, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Open workbook on network

    Hi Leith,

    do I really need to define the name of the server? Both workbooks and users are working on the same server. I need in fact the same check that excel does itself by telling the user that somebody else has already opened the file and whther i want to open it in read-only mode.
    I'ts only the message that I want to change and I want toe exit the started procedure. I ask this question beforehand since I can only test this when somebody else has opened the file. And we're not working today.

    Sjors

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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