ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Lost clipboard contents on Workbook_Activate (https://www.excelbanter.com/excel-programming/378345-lost-clipboard-contents-workbook_activate.html)

Nate[_7_]

Lost clipboard contents on Workbook_Activate
 
Hi all,

I've developed a data validation workbook that upon activation hides
all menu items and displays in fullscreen mode. The problem is that
when I copy data from another Excel session to paste into this
validation workbook, the macro that runs on activation loses the
clipboard contents. After reading through other postings, I don't know
that I can correct this. So my second option is to hide the menus and
display fullscreen upon workbook opening (eliminating the activation
code), but then any other sessions of Excel are displayed this way too,
which could be very frustrating to unknowing users. Has anybody
developed a workaround for this issue, or any other suggestions how I
could proceed?

Thanks!
Nate


NickHK

Lost clipboard contents on Workbook_Activate
 
You have 2 separate instances of Excel ? Or you are referring to 2 workbooks
in the same Excel instance ?
What code do you have in the Workbook_Activate/Worksheet_Activate events to
cause this ?

Depending what you are doing, the DataObject may be useful.

NickHK

"Nate" wrote in message
ups.com...
Hi all,

I've developed a data validation workbook that upon activation hides
all menu items and displays in fullscreen mode. The problem is that
when I copy data from another Excel session to paste into this
validation workbook, the macro that runs on activation loses the
clipboard contents. After reading through other postings, I don't know
that I can correct this. So my second option is to hide the menus and
display fullscreen upon workbook opening (eliminating the activation
code), but then any other sessions of Excel are displayed this way too,
which could be very frustrating to unknowing users. Has anybody
developed a workaround for this issue, or any other suggestions how I
could proceed?

Thanks!
Nate




Nate[_7_]

Lost clipboard contents on Workbook_Activate
 
Nick,

I guess I'm a little fuzzy on the definition of "instances" of Excel.
I'm referring to two separate open workbooks, not sure if they're
separate instances or not. I guess I would want this to handle it
either way since I'm not sure how the end-user is going to open this
file.

The code that I have in the Worksheet_Activate is going to the
"fullscreen" view and hiding/disabling all the menus. Basically, I
wanted to lock it up so that the user would be forced to use the macro
buttons I've created. By running the Activate macro, it's essentially
performing functions that cause the CutCopyMode to be False (although
I've not entered that code).

I think what would work fine for this project is just to use the
worksheet password protection and lock/unlock cells and not worry about
getting too fancy. There may be other times when I'll need to use the
DataObject, so thanks for the suggestion!

Nate



NickHK wrote:
You have 2 separate instances of Excel ? Or you are referring to 2 workbooks
in the same Excel instance ?
What code do you have in the Workbook_Activate/Worksheet_Activate events to
cause this ?

Depending what you are doing, the DataObject may be useful.

NickHK

"Nate" wrote in message
ups.com...
Hi all,

I've developed a data validation workbook that upon activation hides
all menu items and displays in fullscreen mode. The problem is that
when I copy data from another Excel session to paste into this
validation workbook, the macro that runs on activation loses the
clipboard contents. After reading through other postings, I don't know
that I can correct this. So my second option is to hide the menus and
display fullscreen upon workbook opening (eliminating the activation
code), but then any other sessions of Excel are displayed this way too,
which could be very frustrating to unknowing users. Has anybody
developed a workaround for this issue, or any other suggestions how I
could proceed?

Thanks!
Nate



NickHK

Lost clipboard contents on Workbook_Activate
 
Nate,
You can multiple instances of Excel running at the same time. Check the task
manager (Cntrol+Alt+deleteTask manager) for how many entries of "Excel" you
have.
I suspect this is not what you mean, but in fact 2 workbook open in the same
instance of Excel.

With this code, I can still paste copied values into this WB :

Private Sub Workbook_Activate()
Application.DisplayFullScreen = True
End Sub
'This is in the same WB
Private Sub CommandButton1_Click()
Application.DisplayFullScreen = False
End Sub

Or are you doing something else ?

NickHK

"Nate" wrote in message
ps.com...
Nick,

I guess I'm a little fuzzy on the definition of "instances" of Excel.
I'm referring to two separate open workbooks, not sure if they're
separate instances or not. I guess I would want this to handle it
either way since I'm not sure how the end-user is going to open this
file.

The code that I have in the Worksheet_Activate is going to the
"fullscreen" view and hiding/disabling all the menus. Basically, I
wanted to lock it up so that the user would be forced to use the macro
buttons I've created. By running the Activate macro, it's essentially
performing functions that cause the CutCopyMode to be False (although
I've not entered that code).

I think what would work fine for this project is just to use the
worksheet password protection and lock/unlock cells and not worry about
getting too fancy. There may be other times when I'll need to use the
DataObject, so thanks for the suggestion!

Nate



NickHK wrote:
You have 2 separate instances of Excel ? Or you are referring to 2

workbooks
in the same Excel instance ?
What code do you have in the Workbook_Activate/Worksheet_Activate events

to
cause this ?

Depending what you are doing, the DataObject may be useful.

NickHK

"Nate" wrote in message
ups.com...
Hi all,

I've developed a data validation workbook that upon activation hides
all menu items and displays in fullscreen mode. The problem is that
when I copy data from another Excel session to paste into this
validation workbook, the macro that runs on activation loses the
clipboard contents. After reading through other postings, I don't

know
that I can correct this. So my second option is to hide the menus and
display fullscreen upon workbook opening (eliminating the activation
code), but then any other sessions of Excel are displayed this way

too,
which could be very frustrating to unknowing users. Has anybody
developed a workaround for this issue, or any other suggestions how I
could proceed?

Thanks!
Nate






All times are GMT +1. The time now is 07:55 AM.

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