ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Worksheet_Activate event clears clipboard? (https://www.excelbanter.com/excel-programming/331110-worksheet_activate-event-clears-clipboard.html)

Andibevan[_2_]

Worksheet_Activate event clears clipboard?
 
Hi All,

I am using the worksheet_activate and worksheet_deactivate events to turn on
and off Excels automatic calculation so that when I select "Sheet_1" it
turns calculate on and off when the sheet is deselected.

The problem is that using the events in this way appears to clear the
clipboard. As a result I am unable to manually paste data to Sheet_1.

How would I get around this?

I am using the application.calculation = xlManual to turn off and on
calculation.

Thanks in advance

Andi



Tom Ogilvy

Worksheet_Activate event clears clipboard?
 
It would be difficult. If performing an action causes an adverse situation,
then the work around is to avoid the action. In this case, I think you
might have to give something up. You are correct that many actions
performed by macros cause the clipboard to be cleared.

--
Regards,
Tom Ogilvy


"Andibevan" wrote in message
...
Hi All,

I am using the worksheet_activate and worksheet_deactivate events to turn

on
and off Excels automatic calculation so that when I select "Sheet_1" it
turns calculate on and off when the sheet is deselected.

The problem is that using the events in this way appears to clear the
clipboard. As a result I am unable to manually paste data to Sheet_1.

How would I get around this?

I am using the application.calculation = xlManual to turn off and on
calculation.

Thanks in advance

Andi





Damien McBain[_2_]

Worksheet_Activate event clears clipboard?
 
"Tom Ogilvy" wrote in message
...
It would be difficult. If performing an action causes an adverse
situation,
then the work around is to avoid the action. In this case, I think you
might have to give something up. You are correct that many actions
performed by macros cause the clipboard to be cleared.


Does it clear the windows clipboard or just deactivate cutcopymode in excel?



Tom Ogilvy

Worksheet_Activate event clears clipboard?
 
CutCopyMode for sure - but that is usually what someone is doing when they
copy in Excel.

--
Regards,
Tom Ogilvy

"Damien McBain" wrote in message
...
"Tom Ogilvy" wrote in message
...
It would be difficult. If performing an action causes an adverse
situation,
then the work around is to avoid the action. In this case, I think you
might have to give something up. You are correct that many actions
performed by macros cause the clipboard to be cleared.


Does it clear the windows clipboard or just deactivate cutcopymode in

excel?





Damien McBain[_2_]

Worksheet_Activate event clears clipboard?
 
So you could still paste into excel but use PasteSpecial to specify ho (ie
xlvalues?).

"Tom Ogilvy" wrote in message
...
CutCopyMode for sure - but that is usually what someone is doing when they
copy in Excel.

--
Regards,
Tom Ogilvy

"Damien McBain" wrote in message
...
"Tom Ogilvy" wrote in message
...
It would be difficult. If performing an action causes an adverse
situation,
then the work around is to avoid the action. In this case, I think you
might have to give something up. You are correct that many actions
performed by macros cause the clipboard to be cleared.


Does it clear the windows clipboard or just deactivate cutcopymode in

excel?







Tom Ogilvy

Worksheet_Activate event clears clipboard?
 
You will have to test it if you want the authoritative answer for your
situation.

--
Regards,
Tom Ogilvy


"Damien McBain" wrote in message
...
So you could still paste into excel but use PasteSpecial to specify ho (ie
xlvalues?).

"Tom Ogilvy" wrote in message
...
CutCopyMode for sure - but that is usually what someone is doing when

they
copy in Excel.

--
Regards,
Tom Ogilvy

"Damien McBain" wrote in message
...
"Tom Ogilvy" wrote in message
...
It would be difficult. If performing an action causes an adverse
situation,
then the work around is to avoid the action. In this case, I think

you
might have to give something up. You are correct that many actions
performed by macros cause the clipboard to be cleared.

Does it clear the windows clipboard or just deactivate cutcopymode in

excel?










All times are GMT +1. The time now is 11:56 PM.

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