+ Reply to Thread
Results 1 to 5 of 5

workbook openings macro control

  1. #1
    Forum Contributor
    Join Date
    10-31-2018
    Location
    venezia
    MS-Off Ver
    2007
    Posts
    487

    workbook openings macro control

    Hi to all.
    The workbook attached to the INFO sheet contains the accesses of those who open the workbook
    Is this change possible?
    Every time the workbook is opened and then closed, the data in the info sheet must be saved without requesting a save at closing.
    Only if the other sheets are modified must the saved warning be displayed at closure.
    I hope I explained myself
    john
    Attached Files Attached Files

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: workbook openings macro control

    Hi there,

    Take a look at the attached version of your workbook and see if it does what you need.

    It uses the following code:

    Please Login or Register  to view this content.
    The highlighted values may be altered to suit your own requirements.


    The ThisWorkbook.Saved = bSaved statement will cause the "Do you want to save . . ." prompt to be displayed when appropriate, but in reality it is not required because the workbook will have been saved anyway! It may be useful to leave it in place so that Users do not think that the workbook has been closed without giving them the opportunity to save their work.

    Hope this helps - please let me know how you get on.

    Spero di averti aiutato

    Regards,

    Greg M
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    10-31-2018
    Location
    venezia
    MS-Off Ver
    2007
    Posts
    487

    Re: workbook openings macro control

    Hi greg.
    your macro works like mine.
    The modification that I ask, if possible, is that if the sheet is modified and I choose no in the closing notice,
    it must not be changed.
    Now it is so, now at the opening I find the modified workbook
    john
    Last edited by john_cash; 08-21-2019 at 05:07 AM.

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: workbook openings macro control

    Hi again,

    Thanks for your feedback.

    You have two options:

    (a) allow workbook changes not to be saved unless the User agrees;

    (b) record the "FINE SESSIONE" time when the workbook is closed.

    You cannot record the "FINE SESSIONE" time without saving all other changes also.

    Regards,

    Greg M

  5. #5
    Forum Contributor
    Join Date
    10-31-2018
    Location
    venezia
    MS-Off Ver
    2007
    Posts
    487

    Re: workbook openings macro control

    You cannot record the "FINE SESSIONE" time without saving all other changes also.
    that's what I was looking for but it's not possible.
    Anyway thank you anyway Greg M
    A greeting
    john

+ 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. VBA Control other workbook and throw string to other workbook
    By nanutum in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-29-2016, 11:37 AM
  2. Control macro of one workbook, from a macro of another workbook
    By cgadea in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-18-2015, 12:03 PM
  3. Replies: 0
    Last Post: 02-23-2015, 03:07 PM
  4. [SOLVED] Excel Default workbook openings
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 12-31-2014, 04:22 AM
  5. [SOLVED] Macro to do one thing 1st time file opened - do somethin else in future openings
    By ILoveStMartin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-09-2012, 10:17 AM
  6. [SOLVED] Giving Macro control to another workbook
    By Trefor in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-24-2006, 10:20 PM
  7. job openings for programmers
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-11-2005, 02:06 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