+ Reply to Thread
Results 1 to 2 of 2

Upon opening workbook, loop over certain sheets and apply macro

  1. #1
    Registered User
    Join Date
    12-16-2013
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    41

    Upon opening workbook, loop over certain sheets and apply macro

    Hi all,

    Thanks in advance for taking the time to read this. I am having difficulty with implementing an idea and am thankful for any help. To put it simply, I would like to have the following accomplished:

    Upon opening the workbook, a macro searches for certain sheet names and then applies a different macro to those sheets. Here is what I currently have:

    Please Login or Register  to view this content.
    Upon opening the workbook, the code loops through each sheet name in the array and applies
    Please Login or Register  to view this content.
    to each one. The "In_Season" is a module that is called, seen below:

    Please Login or Register  to view this content.
    The ultimate purpose of this workbook is to open and send an email if any of the cells contain "alert" in either sheet. However, upon testing, the workbook seems to loop through only one of the sheets and sends two emails with the same sheet information. I have attached a sample file and have commented out the code so it does not automatically run. Simply input your own email address in the ".To" section to test.

    Macro_Example.xlsm

    Thanks again!

  2. #2
    Registered User
    Join Date
    12-16-2013
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Upon opening workbook, loop over certain sheets and apply macro

    Shameless bump

+ 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. [SOLVED] how to apply macro to all sheets in a workbook
    By genetist in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-22-2014, 12:39 AM
  2. Replies: 4
    Last Post: 03-12-2014, 02:06 AM
  3. [SOLVED] how to apply a macro in a sheet to another sheets in the same workbook?
    By pejoi in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-09-2013, 06:30 AM
  4. VBA to Loop through list of sheets and apply macro
    By hungryhobo in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 05-08-2013, 05:54 PM
  5. run code on opening workbook and apply code to certain sheets
    By Jane in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-08-2005, 05:05 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