Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
E-Mail Importance Flag Q
I use the code, part of which is extracted below, kindly written and
provided by Ron de Bruin, which E-Mails a sheet called "e-Trip", how would I tweak this to set the Importance to High (i.e. value =2) IF a value is 1 in SheetB!AA1. If the value in SheetB!AA1 is <1, then Importance should be set as Normal (i.e. value = 1) Thanks Sub Mail_Report() (code here) With Destwb .SaveAs TempFilePath & TempFileName & FileExtStr, FileFormat:=FileFormatNum On Error Resume Next With OutMail .To = ThisWorkbook.Sheets("E-Trip").Range("BA2").Value .CC = "" .BCC = "" .Subject = ThisWorkbook.Sheets("E- Trip").Range("BA1").Value .Body = strbody .Attachments.Add Destwb.FullName .ReadReceiptRequested = False .Importance = 2 .Send End With On Error GoTo 0 .Close SaveChanges:=False End With 'Delete the file you have send Kill TempFilePath & TempFileName & FileExtStr Set OutMail = Nothing Set OutApp = Nothing With Application .ScreenUpdating = True .EnableEvents = True End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Weight the coulum totals by level of importance? | Excel Discussion (Misc queries) | |||
Find range a value fits to, assign new value based on importance | Excel Worksheet Functions | |||
Set E-Mail Importance with code | Excel Programming | |||
Values and Formulas - Problem - High Importance | Excel Programming | |||
Rows to be moved from one flag to another flag | Excel Programming |