H
HammerJoe
Hi,
I would like to be able to send a sheet by email.
I dont like the idea of having to copy a new sheet and then save it on
disk (due to space constraints) to be able to call the .sendmail, I
decided to go in a simpler way that gives the user the task of
emailing the sheet using the file-send to-mail recipient menu options.
To do this I hide all the sheets except the one that needs to be
emailed so the user cannot do anything else on the workbook and add
(show, it stays hidden all the time) a button that the user clicks to
confirm that they have emailed the sheet and once clicked shows all
the sheets again and proceeds with the code.
To do this I have a "do while loop" with DoEvent waiting for a cell
range to change value which it does when the button is clicked.
Afterwards the button is hidden again.
It works great, but theres one problem.
It works if the sheet is unprotected.
If it is protected then using "mail recipient" doesnt work and I want
that to work and to keep the sheet protected.
I thought of borrowing the .sendmail idea, create a new workbook, copy
the sheet to the new workbook, add the button and wait for it be
clicked and then close it.
How can I add a button (and a label) to the new created workbook and
wait for it to be clicked and then close the newly opened workbook
without confirmation and resume the code?
Thanks for all the help.
I would like to be able to send a sheet by email.
I dont like the idea of having to copy a new sheet and then save it on
disk (due to space constraints) to be able to call the .sendmail, I
decided to go in a simpler way that gives the user the task of
emailing the sheet using the file-send to-mail recipient menu options.
To do this I hide all the sheets except the one that needs to be
emailed so the user cannot do anything else on the workbook and add
(show, it stays hidden all the time) a button that the user clicks to
confirm that they have emailed the sheet and once clicked shows all
the sheets again and proceeds with the code.
To do this I have a "do while loop" with DoEvent waiting for a cell
range to change value which it does when the button is clicked.
Afterwards the button is hidden again.
It works great, but theres one problem.
It works if the sheet is unprotected.
If it is protected then using "mail recipient" doesnt work and I want
that to work and to keep the sheet protected.
I thought of borrowing the .sendmail idea, create a new workbook, copy
the sheet to the new workbook, add the button and wait for it be
clicked and then close it.
How can I add a button (and a label) to the new created workbook and
wait for it to be clicked and then close the newly opened workbook
without confirmation and resume the code?
Thanks for all the help.