Mail every worksheet using A1 as address

sknight22

Board Regular
Joined
Feb 16, 2016
Messages
75
Hello
I am using code from the below link to send multiple sheets to email addresses in cell a1.

http://www.rondebruin.nl/win/s1/outlook/amail5.htm

I have hit a snag though. My sheets are made up of filtered pivots and I don’t want the recipient to be able to take the filter off.

Could the code be amended to first copy and paste special the whole sheet then send?

Thanks

Stephen
 
MasterFils as source file
Workbooks.Open Filename:="Copy Paste your Source File Full Path with extension(.xls,.xlsx....) "
 
Upvote 0

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hello,

I have removed that line and repeated the steps. The correct format remains until i get to "End With" (below) then it goes back to the wrong format

Code:
With wb.Sheets(1).UsedRange                .Cells.Copy
                .Cells.PasteSpecial xlPasteValues
            End With
 
Last edited:
Upvote 0
Stephen

That doesn't make sense, the End With doesn't really do anything - all it does is close of the With..End With block.
 
Upvote 0
Morning,

Maybe it was the way I worded it.

While I was stepping through, everything looked as it should until I pressed F8 while ".Cells.PasteSpecial xlPasteValues" was highlighted. The highlighter moved to "EndWith" and the format was changed.

Does that mean the change occurs as a result of ".Cells.PasteSpecial xlPasteValues"?

Thanks

Stephen
 
Upvote 0
Cross posted http://www.vbaexpress.com/forum/sho...sheet-using-A1-as-address&p=380238#post380238

Cross-Posting
While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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