Ctrl-v doesn't work after changing Application.DisplayFormulaBar

L

Lee Drage

I am developing a spreadsheet based tool. When this
workbook is active in Excel I hide the FormulaBar and
StatusBar (by setting Application.DisplayStatusBar=false,
APplication.DisplayFormulaBar=false in Workbook_Activate).
When the user leaves the workbook I redisplay the formula
and status bars.

So I have:
Workbook_Activate()
Application.DisplayStatusBar=false
Application.DisplayFormulaBar=false
exit sub

Workbook_Deactivate()
Application.DisplayStatusBar=true
Application.DisplayFormulaBar=true
exit sub

If I copy a cell in the workbook I am developing and then
move to another workbook I cannot paste that cell. Neither
Ctrl-v nor Edit-Paste work. Excel doesn't seem to see the
clipboard contents but the cell I copied IS in the
clipboard because I can see it when I look at the
Clipboard toolbar in Excel.

If I comment out the lines
Application.DisplayStatusBar=true
Application.DisplayFormulaBar=true
then copy and paste works as normal. These commands seem
to be confusing Excel's knowledge of the clipboard.

Has anyone else encountered this problem? Is there a work-
around????

Many thanks

Lee
 
D

Dave Peterson

Works the same way in xl2002, too.

The only work around I have is to not hide them.

You could drop them completely or check application.cutcopymode before you
toggle things.

Option Explicit
Sub Workbook_Activate()
If Application.CutCopyMode = False Then
Application.DisplayStatusBar = False
Application.DisplayFormulaBar = False
End If
End Sub
 

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