Creating 1 Single Module For Several Sheets.

C

countryfan_nt

Hi All, Huge fan of the forum,
I have 20 excel sheets, and I wan to have 1 macro script (in a singl
module) that will enable any single chosen sheet to be sent to outloo
as an attachment.
I do not want it to be done on sevreal modules. I was told that havin
One module with the macro script would serve the purpose.

Here is the macro script that I was able to make, please help m
complete what is missing:

Sub report_send()

Sheets("Sheet1").Select
Cells.Select
Selection.Copy
Sheets("Report").Select
Cells.Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone
SkipBlanks:= _
False, Transpose:=False
Range("B1").Select
Application.CutCopyMode = False
Sheets("Sheet1").Select
Range("B2").Select


' the following code is to copy the report sheet after bein
copied & attach it to Outlook
Sheets("Report").Select
Sheets("Report").Copy
Columns("A:A").Select
Cells.EntireColumn.AutoFit
Range("A1").Select
Application.Dialogs(xlDialogSendMail).Show _
arg1:="countryfan_nt", _
arg2:="Pipeline Report " & " - As of " & Date

ActiveWorkbook.Close SaveChanges:=False
End Su
 
C

countryfan_nt

I really appreciate your help. Trouble is I am new on VBAs. The Macr
that I listed is Working, It only needs a little modification
(adjustments). i.e. Please help me in finding where I need to plac
the *ActiveSheets* command?

And please tell me if we do that would it work?

Trully grateful for your time.


Nawa
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top