email active sheet on save

  • Hi all


    I have a workbook with 100 sheets each contians the same form
    When a sheet contians AB or NB in cell J20 I want to email the active sheet to a receipiant when saved


    Any help would be greatly received


    Andy

  • Re: email active sheet on save


    check out this link to a previous thread that should help you with the emailing part...as for the code to loop through all the worksheets it would be along the lines of...


    Code
    For Each sht In ActiveWorkbook.Sheets
        If sht.Cells(10, 20) = "AB" Or sht.Cells(10, 20) = "NB" Then
            'you email code here
        End If
    Next


    Hope this helps...

    D ;)


    :sailboat: [SIZE=1]Better a bad day on the water than a good day in the office[/SIZE]

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!