Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.programming
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help creating a macro to copy and paste a certain selection Shu of AZ Excel Discussion (Misc queries) 0 January 8th 07 04:36 AM
Help creating a macro to copy and paste a certain selection Shu of AZ Excel Discussion (Misc queries) 0 January 7th 07 11:52 PM
Help creating a macro to copy and paste a certain selection Shu of AZ Excel Discussion (Misc queries) 2 January 7th 07 08:26 PM
Need a macro to Copy a selection and paste into a new email. Koolmist Excel Discussion (Misc queries) 3 February 20th 06 04:48 PM
selection.copy - how emulate Paste command? topola Excel Discussion (Misc queries) 1 January 7th 06 03:43 PM


All times are GMT +1. The time now is 03:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"