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 | Calendar | 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
Thread Tools Display Modes
  #1 (permalink)  
Old February 15th, 2012, 06:33 PM
Registered User
Points: 14, Level: 1
Points: 14, Level: 1 Points: 14, Level: 1 Points: 14, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Feb 2012
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default VBA to pwd protect a spreadsheet then email it?


Is there a way in VBA to email a spreadsheet as password protected? This is what I want to do:

1. Open a new spreadsheet and populate it.
2. Email it with Microsoft Outlook (spreadsheet has to be pwd protected).

Then is there a way to delete the spreadsheet after it is sent? For security reasons, we don't want a saved version to be hanging around. This entire process will be automated, and nobody will be monitoring it daily to delete the spreadsheets.

Janice Suzuki
Reply With Quote
  #2 (permalink)  
Old February 29th, 2012, 09:25 PM
Friend of Wrox
Points: 3,060, Level: 23
Points: 3,060, Level: 23 Points: 3,060, Level: 23 Points: 3,060, Level: 23
Activity: 14%
Activity: 14% Activity: 14% Activity: 14%
Join Date: Sep 2005
Location: , , .
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts


Since you are going to send the entire sheet you can try SendMail in Excel (ActiveWorkbook.SendMail)

Else you can go for Outlook VBA (http://vbadud.blogspot.in/2007/04/vb...-vba-mail.html)

C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)
Reply With Quote

Thread Tools
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
How to protect VBA code IranianCuriousBoy Word VBA 5 September 6th, 2009 09:40 AM
Protect / Unprotect Excel 97 - VBA Code - jlpazv Excel VBA 2 November 30th, 2007 09:54 AM
Email Attachment from VBA echovue Access 12 December 27th, 2006 04:51 PM
Automatically attach Excel spreadsheet to Email nbaj2k Excel VBA 3 August 1st, 2006 12:15 PM
Open access database with pwd saikrishnan Pro VB Databases 1 October 9th, 2005 10:45 PM

All times are GMT -4. The time now is 06:22 AM.

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