+ Reply to Thread
Results 1 to 5 of 5

Macro that runs for every sheet stops working

  1. #1
    Registered User
    Join Date
    01-27-2012
    Location
    Durham
    MS-Off Ver
    Excel 2003
    Posts
    61

    Macro that runs for every sheet stops working

    Hi

    I have a macro that runs through every sheet (no matter how many or few) of a workbook. It attaches each relevent worksheet to the relevent email within the sheet.

    This macro worked fine, up untill a few months ago. The macro runs and attaches most sheets as normal, but it the email address in cell A1 which it looks up is no longer recognised

    The bit of the code is

    Please Login or Register  to view this content.
    I have looked into this and cannot find out to why the email addresses are not picked up, each is a valid address with @ in and all vary in length.

    Why would the macor work as normal and then not recognise the email addresses? No error messege is returned, the macro just runs till its normal end.

    Thank You

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro that runs for every sheet stops working

    The only test you really need to do is check for the @ symbol. In my opinion.
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    01-27-2012
    Location
    Durham
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: Macro that runs for every sheet stops working

    Thanks. Ill try that

    I have gone throught the 'step into' mode and can actually see that its skipping the step in question, and the @ sign is physically there. This is what I dont understand, its there so why is it not being opicked up?

    The cell in Excel is formatted as Genaral, which is the same as the others that have worked. All sheets are exactly the same, as they come from a template. The email address is in cell A1 on every sheet to, but the macro only recognises the @ for a handfull of pages. The latest workbook was 96 sheets, but 44 were only picked up. I have ran this macro months ago on workbooks with over 100 sheest and worked fine.

    If this help the full code is:

    Please Login or Register  to view this content.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro that runs for every sheet stops working

    Try my simple tweak first. Does it still skip?
    On the sheet it is skipping, what is the exact value of that checkcell?
    Last edited by JBeaucaire; 10-08-2014 at 10:30 AM.

  5. #5
    Registered User
    Join Date
    01-27-2012
    Location
    Durham
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: Macro that runs for every sheet stops working

    Ill try it, but wont be able to till later in the month, as its busy at work with the year end audit. Ill let you know once I try it

    Thanks

+ 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. Macro that runs when ran from Macro menu, but stops when using short cut keys...
    By Joven76 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-12-2014, 02:29 PM
  2. Timed macro runs for one day, then stops
    By Hardy Eustace in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-10-2013, 01:00 PM
  3. Excel paste special stops the sheet from working
    By hazzaska in forum Excel General
    Replies: 3
    Last Post: 01-08-2013, 09:11 PM
  4. Sheet protection stops macro working.
    By Andrew-Mark in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-18-2009, 11:18 AM
  5. Can macro display a diff't screen while it runs until it stops?
    By KT in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-05-2006, 04:55 PM

Tags for this Thread

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