+ Reply to Thread
Results 1 to 3 of 3

Is there a way to determine if a book has been open manually or by macro?

  1. #1
    Forum Contributor
    Join Date
    09-30-2009
    Location
    Barcelona
    MS-Off Ver
    Excel 2010
    Posts
    274

    Question Is there a way to determine if a book has been open manually or by macro?

    Wondering if it is possible to determine that a workbook has been open manually

    sometimes I do "batch-refresh" and I would like to differentiate the two for traceability of changes

    what I am thinking is in "beforeSave" --> if manualOpen then ... else ...

    thanks!

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Is there a way to determine if a book has been open manually or by macro?

    Why don't you pass some sort of identification in your code while opening it via code?

    Like storing a (Manual/Code) value in a hidden cell or in a named range?

    So based on the value change you can identify which is opened via code


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Contributor
    Join Date
    09-30-2009
    Location
    Barcelona
    MS-Off Ver
    Excel 2010
    Posts
    274

    Re: Is there a way to determine if a book has been open manually or by macro?

    Once it is open, I guess I can do as you say.
    for workbook open, though, i guess there's no way to detect it right?

+ 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: 06-12-2013, 09:05 AM
  2. Run Macro when Other book is open
    By Decoderman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-29-2011, 09:52 AM
  3. open book input data save as title macro and close
    By excellentexcel in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-16-2009, 02:42 PM
  4. [SOLVED] Open book, check for macros, close book
    By CLR in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-31-2005, 02:06 PM

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