Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 1st, 2005, 01:02 PM
Authorized User
 
Join Date: Oct 2005
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Send Worksheet

Hello,

I have a huge spreadsheet, but what I want to do is to send one worksheet from it to an indvidual. So when the suer clicks send, it will automatically abstract the worksheet and the user will only receive this and nothing else.

How is this done

Thanks

Alan
Reply With Quote
  #2 (permalink)  
Old November 2nd, 2005, 06:25 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: , , Finland.
Posts: 168
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Alan

Make a VBA-code that copies ActiveSheet to new workbook and after that you send the new workbook.

Sub CopySheet()

    ActiveSheet.Copy
    ActiveWorkbook.SendMail "xxxx@yyy.com", "Subject"

End Sub

-vemaju


Reply With Quote
  #3 (permalink)  
Old November 2nd, 2005, 08:08 AM
Authorized User
 
Join Date: Oct 2005
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thats great, but I have a slight problem! That copies the worksheet that i want to send, but it creates a new workbook, which i don't want to happen. All I want is for the relevant worksheet to be extracted and for that to be emailed to the user is that possible.
Reply With Quote
  #4 (permalink)  
Old November 2nd, 2005, 01:04 PM
Friend of Wrox
 
Join Date: Oct 2003
Location: , , Finland.
Posts: 168
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Close the workbook without saving it.
Sub CopySheet()

    ActiveSheet.Copy
    ActiveWorkbook.SendMail "xxxx@yyy.com", "Subject"
    ActiveWorkbook.Close SaveChanges:=False
End Sub

-vemaju

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Send URL request to send sms via NowSMS deco BOOK: Professional VB 2005 ISBN: 0-7645-7536-8 0 February 16th, 2008 02:45 PM
Open up Worksheet alannoble26 Excel VBA 5 February 13th, 2006 02:24 PM
Run Time Error - Send Worksheet alannoble26 Excel VBA 0 November 8th, 2005 07:42 AM
Email Worksheet alannoble26 Excel VBA 2 November 7th, 2005 10:33 AM
how to name worksheet by Month yylee Excel VBA 2 April 10th, 2004 01:01 PM



All times are GMT -4. The time now is 11:20 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.