![]() |
E Mail from Excel using a command botton
I am trying to program a command button to send a workbook to a preset e mail
address. Why will this code not work? The CommandButton line fails. I do not know much about VB. Private Sub CommandButton1_Click() Sub Mail_workbook_1() ActiveWorkbook.SendMail ", _ "This is the Subject line" End Sub Thanks for your help. Bob |
E Mail from Excel using a command botton
Hi Bob
You must only copy the code lines in the Click event Like this : Private Sub CommandButton1_Click() ActiveWorkbook.SendMail ", _ "This is the Subject line" End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Bob C" wrote in message ... I am trying to program a command button to send a workbook to a preset e mail address. Why will this code not work? The CommandButton line fails. I do not know much about VB. Private Sub CommandButton1_Click() Sub Mail_workbook_1() ActiveWorkbook.SendMail ", _ "This is the Subject line" End Sub Thanks for your help. Bob |
E Mail from Excel using a command botton
Wow. I feel like a buffoon. LOL!! Nice catch, Ron.
"Ron de Bruin" wrote in message ... Hi Bob You must only copy the code lines in the Click event Like this : Private Sub CommandButton1_Click() ActiveWorkbook.SendMail ", _ "This is the Subject line" End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Bob C" wrote in message ... I am trying to program a command button to send a workbook to a preset e address. Why will this code not work? The CommandButton line fails. I do not know much about VB. Private Sub CommandButton1_Click() Sub Mail_workbook_1() ActiveWorkbook.SendMail ", _ "This is the Subject line" End Sub Thanks for your help. Bob |
E Mail from Excel using a command botton
Thanks so much! Bob C
Ignore the next post sent by accident. "Ron de Bruin" wrote: Hi Bob You must only copy the code lines in the Click event Like this : Private Sub CommandButton1_Click() ActiveWorkbook.SendMail ", _ "This is the Subject line" End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Bob C" wrote in message ... I am trying to program a command button to send a workbook to a preset e mail address. Why will this code not work? The CommandButton line fails. I do not know much about VB. Private Sub CommandButton1_Click() Sub Mail_workbook_1() ActiveWorkbook.SendMail ", _ "This is the Subject line" End Sub Thanks for your help. Bob |
All times are GMT +1. The time now is 07:24 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com