Macro to change values of a cell and send e-mail

Erdalu

New Member
Joined
Feb 25, 2015
Messages
1
Hello all,

I have searched an answer for my question but couldn't find one. Please excuse me if there was a similar one.

Right now my excel file can create PDF and send e-mails thanks to Ron de Bruin's add-in.

What I do is, I change the value of one specific cell manually which updates the worksheet and then click the button initiating the macro.

Problem is that I have to do this process 300 times. Change cell, click button, send e-mail, change cell, click button, send e-mail and so on.

My question: Is there a way to change the cell value automatically and send e-mail right after every change? If yes, can you guide me to a resource for me to read and learn?

Thanks a lot :)
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Paste it in sheet you wanna work.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim Cell As Range
    If Application.Intersect(Target, Range("A1:B30")) Is Nothing Then Exit Sub
    For Each Cell In Target.Cells
        If Len(Cell.Value) = 0 Then
            Application.EnableEvents = False
            Application.Rum "Your_Macro_Name"
            MsgBox "Email Send"
            Application.EnableEvents = True
            Exit For
        End If
    Next Cell
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,991
Messages
6,122,628
Members
449,095
Latest member
bsb1122

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top