ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Procedure kills copy and paste (https://www.excelbanter.com/excel-programming/283406-procedure-kills-copy-paste.html)

Bura Tino

Procedure kills copy and paste
 
Hi,

I have a procedure (shown below) which makes a Controls Toolbar button
vizible if "A1" is selected. An unfortunate side effect is that having this
procedure kills the ability to copy and paste -- if something had been
selected and copied, it disappears once any other cell is clicked.

Can anyone suggest a work around?

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


Many thanks in advance,

Bura




All times are GMT +1. The time now is 02:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com