ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Add email attachment to command button (https://www.excelbanter.com/excel-discussion-misc-queries/48955-add-email-attachment-command-button.html)

Shinka

Add email attachment to command button
 
I put a command button on my spreadsheet and would like the code to email the
spreadsheet when clicked. Probably should save it too before mailing.

Thanks for you programming skills! :)

Ron de Bruin

Hi Shinka

See
http://www.rondebruin.nl/sendmail.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Shinka" wrote in message ...
I put a command button on my spreadsheet and would like the code to email the
spreadsheet when clicked. Probably should save it too before mailing.

Thanks for you programming skills! :)




Shinka

Very helpful, Thanks. I can use them if I attach it as a macro to a
'button'. Get errors if trying to insert it in a 'command button' between:

Private Sub CommandButton1_Click()

End Sub

What is the proper way to insert it?

"Ron de Bruin" wrote:

Hi Shinka

See
http://www.rondebruin.nl/sendmail.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Shinka" wrote in message ...
I put a command button on my spreadsheet and would like the code to email the
spreadsheet when clicked. Probably should save it too before mailing.

Thanks for you programming skills! :)





Ron de Bruin

Hi Shinka

Enter only the macro name in the click event and copy the macro in a normal module

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Shinka" wrote in message ...
Very helpful, Thanks. I can use them if I attach it as a macro to a
'button'. Get errors if trying to insert it in a 'command button' between:

Private Sub CommandButton1_Click()

End Sub

What is the proper way to insert it?

"Ron de Bruin" wrote:

Hi Shinka

See
http://www.rondebruin.nl/sendmail.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Shinka" wrote in message ...
I put a command button on my spreadsheet and would like the code to email the
spreadsheet when clicked. Probably should save it too before mailing.

Thanks for you programming skills! :)







Shinka

That was too simple...LOL
I tried making it a Private Sub, renaming the box to Mail, etc..
Your site is now in my favorites.
Thanks alot Ron

"Ron de Bruin" wrote:

Hi Shinka

Enter only the macro name in the click event and copy the macro in a normal module

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Shinka" wrote in message ...
Very helpful, Thanks. I can use them if I attach it as a macro to a
'button'. Get errors if trying to insert it in a 'command button' between:

Private Sub CommandButton1_Click()

End Sub

What is the proper way to insert it?

"Ron de Bruin" wrote:

Hi Shinka

See
http://www.rondebruin.nl/sendmail.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Shinka" wrote in message ...
I put a command button on my spreadsheet and would like the code to email the
spreadsheet when clicked. Probably should save it too before mailing.

Thanks for you programming skills! :)







Ron de Bruin

You are welcome


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Shinka" wrote in message ...
That was too simple...LOL
I tried making it a Private Sub, renaming the box to Mail, etc..
Your site is now in my favorites.
Thanks alot Ron

"Ron de Bruin" wrote:

Hi Shinka

Enter only the macro name in the click event and copy the macro in a normal module

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Shinka" wrote in message ...
Very helpful, Thanks. I can use them if I attach it as a macro to a
'button'. Get errors if trying to insert it in a 'command button' between:

Private Sub CommandButton1_Click()

End Sub

What is the proper way to insert it?

"Ron de Bruin" wrote:

Hi Shinka

See
http://www.rondebruin.nl/sendmail.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Shinka" wrote in message ...
I put a command button on my spreadsheet and would like the code to email the
spreadsheet when clicked. Probably should save it too before mailing.

Thanks for you programming skills! :)










All times are GMT +1. The time now is 09:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com