LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Programing a button to copy and email

first of all I have already gotten a lot of help from Tom Ogilvy, which I
really appreciate, but here is what he has helped me get so far:

Private Sub CommandButton1_Click()
Dim rng As Range
Set rng = ActiveSheet.PivotTables(1).TableRange2
Set rng = Range(rng(1).Offset(-7, 0), rng)
Workbooks.Add Template:=xlWBATWorksheet
ActiveSheet.Range("A1").Select
rng.Copy
ActiveSheet.Range("A1").PasteSpecial xlValues
ActiveSheet.Range("A1").PasteSpecial xlFormats
ActiveWorkbook.SendMail Subject:="Scheduling", "
ActiveWorkbook.Close SaveChanges:=False

End Sub

What I am still trying to figure out is how I can first of all send the
sheet to an unsent email where the user could then choose a subject and pick
the users they would like to send it to, right now it just sends to
. Also I need to figure out how to ensure the copied and pasted
information has the same format, because when it emails some columns are
shrunk which makes the information difficult to read. Thank you for any help
you may have, I really appreciate it!
 
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
email Button BadRasta! Excel Worksheet Functions 3 May 14th 08 03:27 AM
Programing a button in excel Josh Johansen Excel Programming 12 June 20th 07 12:54 PM
Program a button to copy a pivot table and then email Josh Johansen Excel Discussion (Misc queries) 0 June 18th 07 03:38 PM
Making email button work after email [email protected][_2_] Excel Programming 0 January 10th 07 08:26 PM
can I copy a column of email addresses, paste into email address? Lizizfree New Users to Excel 4 July 20th 06 10:03 PM


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

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

About Us

"It's about Microsoft Excel"