PDA

View Full Version : How to email a pivot table using VBA



ChrisKad
04-17-2015, 07:18 AM
Hi :)

I'm trying to email a section of a pivot table to my boss as requested. The goal is to send to more than one person just the part of the pivot table that concerns each individual.
I am very inexperienced with VBA and I want to start learning. My boss doesn't know how to do it so I really want to help him.

I attached a file that shows what I have done so far. I really don't know where to go from there. The code creates a new excel sheet with the part of the pivot table that I selected, yet it does not email to the desired individual.

Due to reasons of confidentiality, I used fictional e-mails.

Thank you,

Chris

p45cal
04-17-2015, 12:17 PM
There is no code in the file you attached, nor any email addresses, so it is difficult to determine what part of the pivot to send to whom!

ChrisKad
04-20-2015, 01:05 AM
Hi

My apologies.

I don't even know how to save the codes correctly on VBA so I saved them on a word document just in case.

I have microsoft 2010.

Thank you.

Chris

p45cal
04-21-2015, 03:23 PM
Click the button on the sheet next to the pivot table in the attached workbook.
The code is in Module1 of the workbook.

ChrisKad
04-22-2015, 04:29 AM
Hi p45cal

Thanks a lot for your time and patience.

I have recently found a way to make the code work (How ever miraculous it may seem). I verified your attachment and it seems coherent with mine. Thanks a lot. Problem solved!!! :)

Have a great week,

Chris