+ Reply to Thread
Results 1 to 3 of 3

Workbook_Open need not be run if the sheet is already open

  1. #1
    Registered User
    Join Date
    12-06-2009
    Location
    Florida, USA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Workbook_Open need not be run if the sheet is already open

    Hi,

    I have the below subroutine in ThisWorkbook.

    Please Login or Register  to view this content.
    It runs whenever the excel sheet is opened and that is the issue and it is running if the user double clicks on the sheet in the windows explorer even if the sheet doesn't open. Hence, Macro1 starts for the second time.
    How can I deal with this issue? I need only 1 instance of Macro1 to be running at any given time.

  2. #2
    Forum Contributor FRIEL's Avatar
    Join Date
    03-07-2008
    Location
    Coventry
    MS-Off Ver
    2003 and 2007
    Posts
    266

    Re: Workbook_Open need not be run if the sheet is already open

    Please Login or Register  to view this content.
    try this
    it may not be the best way but im pretty sure it works
    I dont like to use code i dont understand
    it makes it hard to use in other situations
    so please try to be as clear and patent as possible with me

    Criticism is welcomed

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Workbook_Open need not be run if the sheet is already open

    You can't store a variable when closing a workbook. The information needs yp stored in a cell or maybe a Name
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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