View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
p45cal[_122_] p45cal[_122_] is offline
external usenet poster
 
Posts: 1
Default Executing Macro Cancels CutCopyMode


Mitch Powell;490391 Wrote:
I have a macro that removes a workbook specific menu in the
Workbook_Deactivate event. The problem is that if the user wants to
copy
information from this workbook into another, the act of flipping to
the
target workbook causes the macro to run and this seems to cancel the
copy
operation and clear the clipboard. Is there any way around this or am
I
stuck with never being able to copy information from this workbook to
another?

If you can cope with the workbook specific menu still being present in
the destination workbook then move the macro from the
workbook_deactivate event to the workbook_beforeclose event?

Perhaps another solution: can you just hide that menu/portion of a
menu, rather than removing it, in the workbook_deactivate event, and
remove it altogether in the worbook_beforeclose event? In the hope that
just hiding (.visible = False?) won't clear the clipboard.


--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=135197