cell entry change to start a macro

Rob Mann

Board Regular
Joined
Jan 10, 2011
Messages
63
please can someone help.
in cell A1 i have a drop down list with 4 peoples names in. when someone picks a name (cell changes from blank, to a name) i want to run a macro. how do i do it. ppppplllllleeeeeeaaaaassssssseeeeee help
 
Maybe this

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("G3:G52")) Is Nothing And Target.Value <> "" Then
    Call SendEMail1
ElseIf Not Intersect(Target, Range("M3:M52")) Is Nothing And UCase(Target.Value) = "YES" Then
    Call SendEMail2
    Sheets(Target.Row).PrintOut
ElseIf Not Intersect(Target, Range("W3:W52")) Is Nothing And UCase(Target.Value) = "YES" Then
    Call SendEMail4
End If
End Sub
 
Upvote 0

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
My spreadsheet is nearly finished now. one last thing i am strugling with is that written in a macro i have selected to print a defined print area on a certain page. Is there a way of making it print to a certain tray on my printer? can printer defaults be set in a macro. I need this page on headed paper but usually print on plain.
 
Upvote 0

Forum statistics

Threads
1,215,343
Messages
6,124,404
Members
449,156
Latest member
LSchleppi

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