View Single Post
  #4   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




and now its back to out of memory error ..
hmmm
olly