Saved as, closed, now send?

Bundywa

New Member
Joined
Jul 27, 2010
Messages
6
Hi all,
Having all sorts of problems with sending a saved file.
I have made a form (in excel 2003) which has data placed into it each day. I have found a small code that when you press a command button on the sheet it saves it as a new file with the date added to the end of the file name, and put into a set folder on a server then closed down.
What I would like to happen is when the user clicks on the button an email copy of the newly saved file is to be sent to 3 email addresses.

The code is I have now is below...

Private Sub cmdClickToSaveAndClase_Click()
ActiveWorkbook.SaveAs "K:\9. Drill & Blast\9.22 Supervisors\9.22.06 Daily Drill Downtime Reports\Daily Sheets\Daily Drill Downtime Report " & Format(Date, "ddmmmyy") & ".xls"
ThisWorkbook.Close
End Sub

Any help would be most welcome
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi Bundy
Add this to the line before the workbbook close line
Code:
ActiveWorkbook.SendMail "NAME","NAME2","NAME3"
 
Upvote 0
WOW..... :eek: I have spent so much time over the last couple of days trying to get this to work....

And all it took was this one little line......

You are a legend.. Thanks you so very much...
 
Upvote 0
Ahh, just one more for the Aussies.....LOL !!!
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,028
Members
448,940
Latest member
mdusw

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