View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
olly olly is offline
external usenet poster
 
Posts: 7
Default Excel+Not Enough Memory..


-----Original Message-----
Hi Olly

Try this on the sheet

Sub Mail_ActiveSheet1()
Dim strDate As String
ActiveSheet.Copy
Cells.Copy
Cells.PasteSpecial xlPasteValues
Cells(1).Select
Application.CutCopyMode = False

strDate = Format(Date, "dd-mm-yy") & " " & Format

(Time, "h-mm-ss")
ActiveWorkbook.SaveAs "Part of " & ThisWorkbook.Name _
& " " & strDate & ".xls"
ActiveWorkbook.SendMail ", _
"This is the Subject line"
ActiveWorkbook.ChangeFileAccess xlReadOnly
Kill ActiveWorkbook.FullName
ActiveWorkbook.Close False
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



Hi Ron
Cheers for that, but now getting this message
Run Time Error 1004
Select method of range class failed

any ideas ?
cheers
olly