Melvin9900
03-12-2021, 07:29 PM
In my Excel when someone change a value in the cell it calls the VBA code to add a audit log into the database. Logic is added inside Private Sub Worksheet_Change()
Failure Scenario - If some one double clicks a cell and doesn't change any value. But Sub Worksheet_Change() still gets execute and audit is added.
I thought Worksheet_Change() is called only if we change anything in the cell.
I can update the query to compare the database value with the cell value before update but I want to see are there any other better way in the excel to call Private Sub Worksheet_Change()
only if cell value is actually changed not just for double click.
Please help.
Failure Scenario - If some one double clicks a cell and doesn't change any value. But Sub Worksheet_Change() still gets execute and audit is added.
I thought Worksheet_Change() is called only if we change anything in the cell.
I can update the query to compare the database value with the cell value before update but I want to see are there any other better way in the excel to call Private Sub Worksheet_Change()
only if cell value is actually changed not just for double click.
Please help.