Complete Automation and Emailing from within Excel 2003


New Member
Sep 11, 2010
I tried to find a post that already was created (in this year) for this type of issue. If I placed this in to the wrong thread please move it to the proper place.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p> </o:p>
I have gone though a lot of the postings about emailing though Excel (2003). The issue is that I am a novice. I do not know how to combine the macros needed to do what I would like to do.
<o:p> </o:p>
I have a spreadsheet with four tabs.
<o:p> </o:p>
Tab 1:
This sheet gets data from a SQL Database. Each morning a standard SQL Query is run to get data form the database. It is formatted to return five columns. I copy the results and paste it in to the sheet (A2) A pivot table is already set up and just needs to be refreshed. I would like the pivot table to refresh once the data is entered if possible. I have been told that Excel can actually run the SQL Query for me and insert the data (maybe a possible enhancement in the future).
<o:p> </o:p>
Tab 2:
I have to enter in text that comes to me in email (text file) every morning. I have to open the text file and cut and paste the data into the second tab (minus the header row). After placing the data in to cell A2, I have to refresh the pivot table on the same tab. If this tab has more than 15 rows I need to color code the tab. The color is yellow. If the rows go past the 45 rows the tab color as red. I would like to have the pivot table refresh once the data is entered.

Tab 3:
On this sheet I have a three pivot tables that need to be refreshed (again I would like to have them refresh automatically). This sheet is just a summary page. This sheet gets emailed (two of the three pivot tables) to a group of people. I would like to have a way to click on a button and the two pivot tables get emailed in a formatted view inside outlook 2003 as one email. The format view needs to have one pivot table listed then the next pivot chart list below the first. I need to have a blank space between each pivot chart to write comments if needed. The first pivot chart (upper left corner) starts in cell AM3, the next one starts in cell N3. Each Pivot chart can be varying in size. The email needs to have a subject line. The subject line is already created in cell N1 of sheet three. Once the email is sent I would like for the excel spreadsheet to be saved on a network share. Saved file needs to be formatted this way “{text}_date”. The date format is yyyymmdd, and for the day before the day the report is emailed.
<o:p> </o:p>
Tab 4:
This is the list of people that need to be in the TO and CC line of the email. Also the email needs to come from a different mailbox that I am apart of. So the From portion of the email needs to be different from mine (I have access to the other email account). I have each name in columns listed by From: (cell A2), To: (cell B2:B6), CC: (cell C2:C3)
<o:p> </o:p>
Now, this is a huge list of things to have excel do. I know that I may be asking for the Moon on this one. I just am having huge issues with getting excel to perform any part of theses “Wish List” items to function at all. As I stated I am a novice and I am not having any luck getting this done. This maybe something excel just cannot do.
<o:p> </o:p>
Any help that anyone gives will have my thanks and gratitude.
<o:p> </o:p>
Reference Items I have tried to use.
<o:p> </o:p><o:p></o:p>

Forum statistics

Latest member

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...