Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello All,
I have created a form in excel (leave application). I have a data validation list, which has departments ie: admin, hr....... and I also have a email submit button. I have found one of the code in a previous post. which actually loads the email envelope with the specified email address in the code. ================================ Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) On Error Resume Next With OutMail ..to = "RecipientAddress" ..CC = "CarbonCopyAddress" ..BCC = "BlindCarbonCopyAddress" ..Subject = "Your subject here" ..Attachments.Add ActiveWorkbook.FullName 'Attaches active workbook ..Display 'Displays the processed email. You can change this to .Send End With On Error GoTo 0 =============================== Anybody has any idea how this can be done. Any help is greatly appreciated. I need a code that when a user clicks the submit button, it should check the data validation list and send 1 email to the respective manager and 1 to the HR. ie: If i select Admin from the drop down validation list. one mail should go to admin department (whoevers email address is specified) and other one should go to the HR department, when i click the submit button. Thanks in advance. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Run VBA code only worksheet change, but don't trigger worksheet_change event based on what the code does | Excel Programming | |||
Shorten code to apply to all sheets except a few, instead of individually naming them, and later adding to code. | Excel Programming | |||
Protect Sheet with code, but then code will not Paste error. How do i get around this. Please read for explainations.... | Excel Programming | |||
Excel code convert to Access code - Concat & eliminate duplicates | Excel Programming |