![]() |
Executing Macro Cancels CutCopyMode
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? |
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 |
Executing Macro Cancels CutCopyMode
Doesn't work. It appears that any menu manipulations at all set CopyCutMode
= False "p45cal" wrote: 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 |
Executing Macro Cancels CutCopyMode
Mitch Powell;490495 Wrote: Doesn't work. It appears that any menu manipulations at all set CopyCutMode = False "p45cal" wrote: 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: 'The Code Cage Forums - View Profile: p45cal' (http://www.thecodecage.com/forumz/member.php?userid=558) View this thread: 'Executing Macro Cancels CutCopyMode - The Code Cage Forums' (http://www.thecodecage.com/forumz/sh...d.php?t=135197) So you can't cope with the workbook specific menu still being present in the destination workbook? -- 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 |
All times are GMT +1. The time now is 07:45 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com