+ Reply to Thread
Results 1 to 5 of 5

auto open code

  1. #1
    Registered User
    Join Date
    03-30-2009
    Location
    New Jersey
    MS-Off Ver
    Excel 2003
    Posts
    2

    auto open code

    I have a spreadsheet with numerous identically formatted worksheets. I want to have the following macro run on the appropriate worksheet whenever cells O28, P28, or Q28 are changed on that worksheet. The code below obviosuly only works on Sheet1 however I'd like to edit the SUb auto_open code to run on any worksheet. How can I do that?

    Please Login or Register  to view this content.
    Last edited by royUK; 03-31-2009 at 02:35 AM.

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

    Re: auto open code

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

    I will add them this time.
    Hope that helps.

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

    Free DataBaseForm example

  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: auto open code

    Does the posted code actually work?

  4. #4
    Registered User
    Join Date
    03-30-2009
    Location
    New Jersey
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: auto open code

    Yes, but maybe I can simplify my question. What this code does is call the macro when those particular cells are changed, O28, P28, or Q28. However in the auto_open function, I am only referencing Sheet1. Somehow I would like the macro to be called when those cells are changed on ANY worksheet.

    I imagine this would just require a change in the auto_open function though I can't figure it out.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: auto open code

    Maybe like this:

    In ThisWorkbook:
    Please Login or Register  to view this content.
    In a code module:
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

+ 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