Link to home
Create AccountLog in
Avatar of Fordraiders
FordraidersFlag for United States of America

asked on

Possible to know what a user is doing on an excel sheet ? copy and/or/typed paste mode ?

excel 2010 vba

Is it possible to know or capture  what a user is doing on an excel sheet ? copy and/or/typed  paste mode ?

in the sheet change or selection change event?

Scenario 1:
If a person has copied some text and is placing it into a another cell?
Scenario 2:
If a person has typed some text in current call and then hit the {Enter} key?
Scenario 3:
If a value is already in a current cell and then double-clicked in the current cell and then move off that current cell?

Thanks
fordraiders
Avatar of OriNetworks
OriNetworks

A simple search has shown others have been unsuccessful at this but it may be possible(although unreliable) to use sendkeys on open to start recording a macro.

If you are just looking for tracking changes, excel has built in change tracking
http://office.microsoft.com/en-us/excel-help/track-changes-in-a-shared-workbook-HP010342961.aspx
Avatar of Fordraiders

ASKER

ok, not necessarily wanting to track changes...but seeing if a mode is true or false..

like is the cut or copy mode active = true or false
is there any change going on in a cell...
is anyone typing in a cell currently =  true or false

those type of things
Hi, fordraiders.

It depends on exactly what you're trying to identify, so it would help to know what you're trying to achieve. In the meantime...

If a person has copied some text and is placing it into a another cell?
Using the Worksheet Change Event, you could identify that the cell has changed and that it's value is the same as that in the clipboard, but not definitively that the user had pasted the new data.

If a person has typed some text in current call and then hit the {Enter} key?
Again, the Worksheet Change Event could identify that a change has occurred but not definitively that they had not pasted the new data.

If a value is already in a current cell and then double-clicked in the current cell and then move off that current cell?
With the Worksheet BeforeDoubleClick Event you would remember the cell that was double-clicked. Then you could use the Worksheet SelectionChange Event to recognise that the previously selected cell was the double-clicked one.

is anyone typing in a cell currently =  true or false
You can't do this with Excel.

Regards,
Brian.
this type of catching:
  If Application.CutCopyMode = 1 Then
                 Application.CutCopyMode = 0
                   'code
                   End If
fordraiders,

Are you just trying to disable Copy/Paste?

Thanks,
Brian.
Are you just trying to disable Copy/Paste?
not disable but if its in just turn it off
 Application.CutCopyMode = 0
ASKER CERTIFIED SOLUTION
Avatar of redmondb
redmondb
Flag of Afghanistan image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
ThANKS
Thanks, fordraiders.

Which of these options worked for you?