View Single Post
  #1   Report Post  
John
 
Posts: n/a
Default Macro - Copy - Email

I have created a form that is sent to a department whenever a new account is
opened. The file is too big to send, so I am trying to copy to two
worksheets within the form, paste them into a new workbook and then send that
email.

Within the Macro it keeps putting the newest workbook (i.e. book15)
Whenever you want it to copy and paste into a new workbook, the workbook
number is going to be different. Is there a way in excel, within the macro,
to have it just put it into a new work book instead of a specific numbered
work book? I know this is confusing. I have included the macro in this
message to see if that would help.

Sheets("PEF").Copy
Windows("Copy of Master Form V3.00.xls").Activate
ActiveSheet.Next.Select
ActiveSheet.Next.Select
ActiveSheet.Next.Select
ActiveSheet.Next.Select
ActiveSheet.Next.Select
ActiveSheet.Next.Select
ActiveSheet.Next.Select
ActiveSheet.Next.Select
ActiveSheet.Next.Select
ActiveSheet.Next.Select
ActiveSheet.Next.Select
ActiveSheet.Next.Select
Sheets("Check Order").Copy
Application.Dialogs(xlDialogSendMail).Show
Windows("Book15").Activate
Application.Dialogs(xlDialogSendMail).Show
Windows("Copy of Master Form V3.00.xls").Activate
ActiveSheet.Previous.Select
ActiveSheet.Previous.Select
ActiveSheet.Previous.Select
ActiveSheet.Previous.Select
ActiveSheet.Previous.Select
ActiveSheet.Previous.Select
ActiveSheet.Previous.Select
ActiveSheet.Previous.Select
ActiveSheet.Previous.Select
ActiveSheet.Previous.Select
ActiveSheet.Previous.Select
ActiveSheet.Previous.Select
End Sub