View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Steved Steved is offline
external usenet poster
 
Posts: 519
Default Shname = Array("Sick Graph","Accident Graph")

Hello from Steved

I thankyou all for your reponses.

"Peter T" wrote:

I haven't tried the code but I would have thought you'd end up with
(typically) three additional empty sheets. Of course those could be deleted
but could do this -

Sheets(Array("Sick Graph", "Accident Graph")).Copy
with ActiveWorkbook
..Saveas "NameForTheEmail.xls"
s = .Fullname
..SendMail "adresss1"
..Close false
End With
Kill s

I think it'd better though to follow Ron de Bruin's example in the link
provided by JLGWhiz

To the OP - If those sheets are chart-sheets, or if one or both are
worksheet(s) but do not include all chart source data, you'll need to remove
any links to data in the original workbook before mailing.

Regards,
Peter T


"Patrick Molloy" wrote in message
...

' STANDARD MODULE
Option Explicit
Sub Main()
Dim shNames As Variant
Dim shName As Variant
Dim wb As Workbook
Dim ws As Worksheet


shNames = Array("Sick Graph", "Accident Graph")


Set wb = Workbooks.Add()
For Each shName In shNames
Set ws = ThisWorkbook.Worksheets(shName)
ws.Copy befo=wb.Worksheets(1)

Next

wb.SendMail "adresss1"

End Sub


"Steved" wrote:

Hello From Steved

Shname = Array("Sick Graph")

To This please

Shname = Array("Sick Graph","Accident Graph")

Is it possible please ( Sending 2 worksheets from 1 workbook )
Thankyou.