Fiínek Cahů
Fiínek Cahů

Reputation: 67

Excel full screen mode cant write to cell

I have a problem with excel in full screen mode. When I chose another sheet (via macro) and go back to previous sheet (via macro) I cant write something to cell selected cell. Any advice?

My code for fullscreen:

    Private Sub Workbook_Open()
Application.DisplayFullScreen = True
Application.CommandBars("Full Screen").Visible = False
End Sub

My macro code for select sheet:

Private Sub skok()
Sheets("Sheet 2").Select
End Sub

Upvotes: 0

Views: 785

Answers (3)

Skymind
Skymind

Reputation: 9

I have the same problem, and it is an Excel bug! We can still copy/paste values in cells, write in cells by VBA code, but we cannot edit cells' value anymore by double-clicking the cell (or F2). The cell edition is frozen! (It is like unchecking the option "Allow editing directly in cells" (Options->Advanced options-> (Sector)"Editing options".)

To create the bug: Click on an ActiveX control while you are in full screen mode (Application.DisplayFullScreen = True) ...and the bug is there now you cannot edit cells anymore!

The bug stays as long as the formula bar is not physically visible on your screen (fullScreen or not) and will STOP (as long as you do not recreate the bug...) as soon as the formula bar is displayed (staying in fullScreen and executing "Application.DisplayFormulaBar = True" won't work)

The bug will "temporarily" stop (with hidden formula bar) if you activate another sheet but will start again if you click on any other ActiveX control in any sheets (fullScreen or not)...

Upvotes: 1

Randhir Mungra
Randhir Mungra

Reputation: 26

I can testify that this problem is happening to my workbook also!

To improve visibility, I make the workbook go fullscreen with the DisplayFullscreen=True in the same sub.

Later, the user can move to Sheets 2 with macro in a command button. On sheet 2 there is a button "Save & Return" which runs a macro like

Sheets("Sheet1").select

But when we return to Sheet1 the cells seem to freeze. But the command buttons still work.The situation can be 'unlocked' when I randomly select another sheet below on the sheet tab. Then returning to Sheet1 I can then enter in the cells!

One strange thing is that although the sheet seem freeze, I can still copy & paste text in a cell using the Ctrl+C & Ctrl+V on keyboard.

Upvotes: 1

Preston
Preston

Reputation: 8187

The answer is a good lesson in form. Try to avoid .Activate and .Select. If you always specify your ranges you can avoid situations like this with multiple workbooks. Use the format:

Workbooks("myBook.xlsx").Sheets("Sheet1").Range("A1").Value = "whatever"

or:

with Workbooks("myBook.xlsx").Sheets("Sheet1")
    .Range("A1").Value = "A"
    .Range("A2").Value = 2
    .Range("A3").Value = "Blah"
End With

Upvotes: 0

Related Questions