Refresh, split data and email data using VBA

Tenny47

New Member
Joined
Sep 10, 2018
Messages
3
Hello all,

I'm new to this site and it was recommended by afriend - thankyou for letting me join.

I'm not familiar VBA but aware of the powerful thingsit can achieve so look forward to developing my knowledge.

I was hoping there was a code available which I could use in a Macro.

I have an ODBC connection linked to an excel workbookand this contains lots of information relevant to customers. I would like to do the following:

1. Refresh the sheet.
2. Split the refreshed data into separateworksheets based on a value within the sheet (Customer name for example).
3. Name the 'new' sheet based on that customer.
4. Generate emails for each customer based on anemail address within the Customer worksheets and save to my draft email folder- the email ideally will contain predefined text and also a copy of the worksheetthat is only relevant to that customer.

Will it be possible to decide which emails aregenerated? For now I only want togenerate emails for a predefined list of customers but would like a worksheet for all customers to be generated so I can review.

Can the macro access be hidden when theworksheet is attached to the email so the recipient can't see the code?

Thankyou in advance.

<strike></strike>
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Hello and welcome!

Trust me you have come to the right place. I started just like you and found this amazing place and learned so much.

To answer your questions... yes that is absolutely possible.

You can have a list of all of your customers and simply select the ones you wish to run this report for.

Unfortunately I do not have access to my old files as I have moved jobs and I had something that did something similar to this already ...

More than likely someone will chime in.

Good luck with everything
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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