Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I set up a botton on Excel 2003 to go to the next sheet? | Excel Worksheet Functions | |||
Command botton | Excel Discussion (Misc queries) | |||
Update Botton | Excel Discussion (Misc queries) | |||
Command botton text font | Excel Discussion (Misc queries) | |||
Assign Macro to Command Botton | Excel Programming |