Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
IF Statement and VBA
I found some code on the web
(http://www.rondebruin.nl/mail/folder1/mail2.htm) that will open email but I need to tweak it a bit. I need to preface the action with an IF statement and since I don't know VBA I am hoping someone can help me modify what is wrong: IF A1 = 800 then Sub Mail_ActiveSheet() Dim wb As Workbook Dim strdate As String strdate = Format(Now, "dd-mm-yy h-mm-ss") Application.ScreenUpdating = False ActiveSheet.Copy Set wb = ActiveWorkbook With wb .SaveAs "Part of " & ThisWorkbook.Name _ & " " & strdate & ".xls" .SendMail ", _ "This is the Subject line" .ChangeFileAccess xlReadOnly Kill .FullName .Close False End With Application.ScreenUpdating = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF statement inside a SUMIF statement.... or alternative method | Excel Worksheet Functions | |||
Reconcile Bank statement & Credit card statement & accounting data | Excel Worksheet Functions | |||
Embedding an OR statement in an IF statement efficiently | Excel Discussion (Misc queries) | |||
If statement or lookup statement not sure | Excel Worksheet Functions | |||
appending and IF statement to an existing IF statement | Excel Worksheet Functions |