Lost clipboard contents on Workbook_Activate

N

Nate

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
 
N

NickHK

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
 
N

Nate

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
 
N

NickHK

Nate,
You can multiple instances of Excel running at the same time. Check the task
manager (Cntrol+Alt+delete>Task 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top