Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Creating 1 Single Module For Several Sheets.

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

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Creating 1 Single Module For Several Sheets.

Hi

You can find code on my site or you can use
My Add-in.
http://www.rondebruin.nl/sendmail.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl


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

Here is the macro script that I was able to make, please help me
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 being
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 Sub


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Creating 1 Single Module For Several Sheets.

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

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Creating 1 Single Module For Several Sheets.

You must use my code to create a new workbook with the activesheet

This send the ActiveSheet
http://www.rondebruin.nl/mail/folder1/mail2.htm

Or this one with the Outlook Object model
http://www.rondebruin.nl/mail/folder2/mail2.htm

See the tips if you want to change the examples

--
Regards Ron de Bruin
http://www.rondebruin.nl


"countryfan_nt " wrote in message ...
I really appreciate your help. Trouble is I am new on VBAs. The Macro
that I listed is Working, It only needs a little modifications
(adjustments). i.e. Please help me in finding where I need to place
the *ActiveSheets* command?

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

Trully grateful for your time.


Nawaf


---
Message posted from http://www.ExcelForum.com/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating UDF by Class Module (Leo)? Leo Excel Discussion (Misc queries) 1 December 2nd 08 10:59 AM
Copy vb module in all excel sheets sohraaz Excel Discussion (Misc queries) 1 July 21st 07 03:16 PM
Creating a Hyperlink from a Single Word Kara Links and Linking in Excel 1 July 1st 06 12:40 PM
Help creating single cell Pop-up Bill Excel Worksheet Functions 2 June 23rd 05 05:21 PM
Macro, Module, function, sub and This workbook and sheets ? Hari[_3_] Excel Programming 17 June 15th 04 11:03 PM


All times are GMT +1. The time now is 11:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"