| Activate & Deactivate Clipboard worksheet compensationPosted: 27 Jan 2012 Tags: Activate amp Deactivate Clipboard worksheet compensation Activate amp Deactivate Clipboard worksheet compensation Question: I have a two routines that when the worksheet is enabled or disabled will clear the contents of the Clipboard. This is exactly what I do not want. The problem is that this does not make a difference on the actual commands in the routine. I have one by one, commented and delete commands. If any of the commented lines are uncommented, the Clipboard is cleared. I can put in x = 1 and that disable the Clipboard. I have searched all CellDragAndDrop project and all the = true. I have some of them have rather false, but he thought that it might be the problem by an invisible link between the routines. I even deleted all "ThisWorkbook" Excel object, and it is still based on having commented lines below without comment. Private Sub Worksheet_Activate() Private Sub Worksheet_Deactivate() Brad Answer: Almost everything you do in the code that modifies the interface will clear the Clipboard. When it can only change what needs to change. Perhaps change your code like this With ActiveWindowSI.DisplayGridlines then.DisplayGridlines = False Sinon.DisplayZeros then.DisplayZeros = True End with This should help preserve the Clipboard where nothing did need to be changed, which I suspect with this special code will be most of the time the event is raised. Faisant.CellDragAndDrop = True does help better not to try. Peter Thornton Rate this article:
|
0 Comments