Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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

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





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I set up a botton on Excel 2003 to go to the next sheet? Bruce Excel Worksheet Functions 1 May 5th 10 08:23 PM
Command botton Lou825 Excel Discussion (Misc queries) 3 April 13th 10 11:19 PM
Update Botton saman110 via OfficeKB.com Excel Discussion (Misc queries) 3 July 31st 07 05:27 PM
Command botton text font nsv Excel Discussion (Misc queries) 1 April 27th 06 09:43 AM
Assign Macro to Command Botton Ron de Bruin Excel Programming 0 August 8th 03 12:17 PM


All times are GMT +1. The time now is 12:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"