cancel
Showing results for 
Search instead for 
Did you mean: 

How do I stop a package from getting triggered in after_save() function when no data is saved

former_member339201
Participant
0 Kudos

Hi Experts,

We have provided a SAVE button to the user in the input template which is assigned to the standard macro to save data.

In after_save() function we are triggering a package when the user inputs through the particular template sheet.

Issue is that when user clicks accidently on SAVE button, then with no changed data, message appears that there is no data to save, but after this the package configured in AFTER_SAVE function gets triggered.

Now user does not want this feature. I am looking for way to avoid package triggering when there is no data to save.

Regards,
SHUBHAM

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Kudos

You can always check if there is the data to save using:

Function GetReportsDataCountToSubmit(sheet As Worksheet) As Long

former_member186338
Active Contributor
0 Kudos

But I do not understand why after_save event will trigger? This event will not happen if there is no data to save.

Looks like you have done some mistakes in the code. Please show full code!