C
carl
I'm having problems with display alerts that I'm not sure is fixable. I have
a macro that lets your choose a date from a form and then from that it takes
data from one workbook and copies it in to three other workbooks. It then
saves, closes and emails them to certain distribution lists. The problem is
that the form allows the user to potentially pick a previous month that has
already been saved and emailed. If it does then it comes up with an alert
asking the user if they want to overwrite the workbook that already exists.
But for me I would prefer to not even give the user an option. Is there a
way of writing an If statement that says:
If this alert comes up then end the sub and close the workbooks that were
opened and created without saving Else continue running.
Or just something that will basically also choose No when it ask if the user
wants to over write the existing workbook.
Otherwise I fear one day someone will choose Yes and they will send out the
previous months workbooks again.
a macro that lets your choose a date from a form and then from that it takes
data from one workbook and copies it in to three other workbooks. It then
saves, closes and emails them to certain distribution lists. The problem is
that the form allows the user to potentially pick a previous month that has
already been saved and emailed. If it does then it comes up with an alert
asking the user if they want to overwrite the workbook that already exists.
But for me I would prefer to not even give the user an option. Is there a
way of writing an If statement that says:
If this alert comes up then end the sub and close the workbooks that were
opened and created without saving Else continue running.
Or just something that will basically also choose No when it ask if the user
wants to over write the existing workbook.
Otherwise I fear one day someone will choose Yes and they will send out the
previous months workbooks again.