+ Reply to Thread
Results 1 to 11 of 11

insert who accesses in the workbook

  1. #1
    Forum Contributor
    Join Date
    08-27-2019
    Location
    europa
    MS-Off Ver
    excel 2007
    Posts
    546

    insert who accesses in the workbook

    Hello everyone.
    In the attached workbook there are macros in thisworkbook:
    Please Login or Register  to view this content.
    and in:

    Please Login or Register  to view this content.

    which are used to enter in the "ACCESSI" sheet whoever accesses the workbook.
    Also in this workbook there is a macro:

    Please Login or Register  to view this content.
    to authorize the use of the workbook to certain users who are in the sheet "utenti_errori" column E

    There is a problem:

    if changes are made and at closing I say "do not save" these changes remain.
    Help to correct?
    I hope I have explained.
    xam
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: insert who accesses in the workbook

    ignore - misread the issue

  3. #3
    Forum Contributor
    Join Date
    08-27-2019
    Location
    europa
    MS-Off Ver
    excel 2007
    Posts
    546

    Re: insert who accesses in the workbook

    I badly explained myself?
    Sorry for my English

  4. #4
    Forum Contributor
    Join Date
    08-27-2019
    Location
    europa
    MS-Off Ver
    excel 2007
    Posts
    546

    Re: insert who accesses in the workbook

    Hello on the net I found

    Please Login or Register  to view this content.
    and in the sheet "AVVISI"

    Please Login or Register  to view this content.
    work well.

    Now how to insert the exact variable here?

    string1 = ThisWorkbook.BuiltinDocumentProperties("content status").Value

    long? variant? string.......
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    08-27-2019
    Location
    europa
    MS-Off Ver
    excel 2007
    Posts
    546

    Re: insert who accesses in the workbook

    Ops not work the modification the post# 4

  6. #6
    Forum Contributor
    Join Date
    08-27-2019
    Location
    europa
    MS-Off Ver
    excel 2007
    Posts
    546

    Re: insert who accesses in the workbook

    Basically what I ask is that if changes are made or not to the workbook, whoever makes the changes must be entered

  7. #7
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: insert who accesses in the workbook

    I'm lost as to some of the logic, but the attached has been chopped around a little more and rather than trying to handle everything in the Before_Close event the code has been split out so the Before_Save event is used to determine if the user can save or not.

    If the user is authorised to save then it just saves and will prompt to backup immediately after (I've not looked at that, and it may not be the best place for it).

    If the user is not authorised to save then the (Italian) 'You are not authorised...' message box will be displayed, the workbook Saved Flag is set to True to prevent other prompts before the next change and the procedure exits.

    In the Before_Close event, it again checks and if the user is not authorised it will prompt "Edits will not be saved..." and gives a choice to continue to close or keep the workbook open (in case they might need to copy changes, or whatever).

    I'm not saying this is the answer to your question but it is probably a better place to start from. To be honest, the best way to handle this would be to manipulate the ribbon and disable the Save options if the user is not authorised to save - this would greatly simplify things.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    08-27-2019
    Location
    europa
    MS-Off Ver
    excel 2007
    Posts
    546

    Re: insert who accesses in the workbook

    Hi cytop,
    what I'm looking for is this

    Basically what I ask is that if changes are made or not to the workbook, whoever makes the changes must be entered

  9. #9
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: insert who accesses in the workbook

    "...if changes are made or not to the workbook, whoever makes the changes must be entered..."

    I'm sorry. I'm confused but this is not what you posted in your first thread. Probably best if I leave it for someone else with a new perspective on this.

  10. #10
    Forum Contributor
    Join Date
    08-27-2019
    Location
    europa
    MS-Off Ver
    excel 2007
    Posts
    546

    Re: insert who accesses in the workbook

    Thanks the same cytop.

    The change is that I ask is in the post #6
    I hope I have explained

  11. #11
    Forum Contributor
    Join Date
    08-27-2019
    Location
    europa
    MS-Off Ver
    excel 2007
    Posts
    546

    Re: insert who accesses in the workbook

    Hello,
    is it possible to save only 1 sheet?
    So it doesn't work:

    Sheets("info").Save

+ 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. Replies: 0
    Last Post: 05-21-2020, 07:36 AM
  2. [SOLVED] keep a log of who accesses a file and how many times
    By cmorten82 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-24-2018, 11:45 AM
  3. Custom Function now accesses a cell due to worksheet size increase in 2010 - How to fix?
    By Culleoka Al in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-02-2013, 03:04 PM
  4. How to write a formula which accesses the just previous sheet
    By jsingh125 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-03-2012, 07:35 AM
  5. Replies: 1
    Last Post: 02-01-2012, 08:03 AM
  6. Macro that accesses the a web page and copies the content
    By helixman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-04-2008, 01:31 AM
  7. [SOLVED] Tracking who accesses a spreadsheet
    By juamig in forum Excel General
    Replies: 1
    Last Post: 03-08-2006, 01:55 AM

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