View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Anders S[_2_] Anders S[_2_] is offline
external usenet poster
 
Posts: 57
Default Copy&Paste and Selection Change

Bura,

The following short version of your code confirms the problem. I have no idea why it happens.

I suggest you start a new thread based on what we have found out this far. You may mention that the button is from the Controls Toolbar.

'-----
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Target.Address = "$A$1" Then
AddFundButton.Visible = True
Else
AddFundButton.Visible = False
End If
End Sub
'-----

Best regards,
Anders Silven

"Anders S" skrev i meddelandet ...
Bura,

'-----
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Beep
End Sub
'-----

The above code does not cancel Copy, so I don't think it is Worksheet_SelectionChange in itself that is the problem. Set a breakpoint in the beginning of your code and step through the code with F8 and watch when the Copy is cancelled. Or post your code.

HTH
Anders Silvén


"Bura Tino" skrev i meddelandet news:4aRub.51637$Dw6.265608@attbi_s02...
Hi,

My worksheet has a Worksheet_SelectionChange event. An unfortunate side
effect of this is that I can no longer copy and paste. If I have something
on the clipboard, it dissappears once I click on the target cell. (You know,
how ability to paste disappears once you do anything...)

Can anyone suggest a work around?


Thanks,

Bura