Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy&Paste and Selection Change
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy&Paste and Selection Change
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy&Paste and Selection Change
|
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help creating a macro to copy and paste a certain selection | Excel Discussion (Misc queries) | |||
Help creating a macro to copy and paste a certain selection | Excel Discussion (Misc queries) | |||
Help creating a macro to copy and paste a certain selection | Excel Discussion (Misc queries) | |||
Need a macro to Copy a selection and paste into a new email. | Excel Discussion (Misc queries) | |||
selection.copy - how emulate Paste command? | Excel Discussion (Misc queries) |