I am very new at writing VB and have managed to send an email with Excel 2003. When I had to upgrade to 2010 so ended this to work. Is there anyone who could help me to make this work in Excel 2010. I have a problem with the format of date and when I save as. The file I'm working on now. Xlsm
Please i need help!!
![]()
Sub E_Post_Zon_1() ' ' Mail Macro ' Macro recorded 2011-07-06 by Santors Range("B8").Select ActiveCell.FormulaR1C1 = "61000" Range("B9").Select ' Dim strDate As String ActiveSheet.Copy strDate = Format(Date, "dd-mm-yy") & " " & Format(Time, "h-mm-ss") ActiveWorkbook.SaveAs "Test Stockholm" & ThisWorkbook.Name _ & " " & strDate & ".xls" ActiveWorkbook.SendMail "santors71@gmail.com", _ "Test Bonus " ActiveWorkbook.ChangeFileAccess xlReadOnly Kill ActiveWorkbook.FullName ActiveWorkbook.Close True END SUB
Regards Santors
Bookmarks