Send cell by email - protected sheet

menaaj

New Member
Joined
Jul 17, 2015
Messages
2
I have a worksheet that has cells/formulas protected so that the data
stays accurate. I left certain cells unprotected for others to access and
fill in their information. The problem is that when trying to send the
worksheet as the message body only by email, not an attachment, an error pops up
saying:

"A sheet in the workbook you are trying to save is password protected.
Password protected sheets cannot be saved in a Web Page. To save this file
as a Web Page, you must first remove the password."

Send the workbook as an attachment is not an option, any suggestions?

Thanks...
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
If you are using VBA to generate the e-mail, try turning the protection off, then copying it to your e-mail, then switching it back on again?

Code:
Dim sht As Worksheet
With sht
    .Unprotect "Password"
    ....
    .Protect "Password"
End With

Also, I'm not sure how you are embedding the range into the body of the e-mail, but I tend to publish it to a HTML file :

Code:
Dim wbk As Workbook
Dim sht As Worksheet
Dim rng As Range

wbk.PublishObjects.Add xlSourceRange, "C:\Temp\Temp.htm", sht.Name, rng.Address, 0, "", ""

...and then read that into a text stream (using FSO) and add it to the HTML body of the MailItem. Might be worth looking into; I've never noticed it having an issue with protected cells...
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,854
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top