agarwaldvk
01-03-2012, 06:44 PM
Hi Everybody
I have a 'Worksheet_Change()' event. As a part of the code inside the procedure, I want to be able to distinguish if the user has manually changed the value in a cell (manual entry) or has changed the value of the cell by copying/pasting data in that cell.
To that end, I am trying to capture if the last key press before the code in the 'Worksheet_Change()' is executed. Is there a way to capture what was the last key pressed before the code in the 'Worksheet_Change()' ran?
I looked at the 'GetAynckeyState()' API function but that won't do the job since it will only track the state of the key at the INSTANT the function was called - which doesn't help in this case.
Any othe suggestion?
Best regards
Deepak
I have a 'Worksheet_Change()' event. As a part of the code inside the procedure, I want to be able to distinguish if the user has manually changed the value in a cell (manual entry) or has changed the value of the cell by copying/pasting data in that cell.
To that end, I am trying to capture if the last key press before the code in the 'Worksheet_Change()' is executed. Is there a way to capture what was the last key pressed before the code in the 'Worksheet_Change()' ran?
I looked at the 'GetAynckeyState()' API function but that won't do the job since it will only track the state of the key at the INSTANT the function was called - which doesn't help in this case.
Any othe suggestion?
Best regards
Deepak