I have a workbook with various improvements (macro, formulas). By default, the workbook opens in full screen mode.
Private Sub Workbook Open ()
Application.DisplayFullScreen = True
End Sub
Recently I added an activeX button. This button appears if the specified cell is not empty. The worksheet_ change event is responsible for this.
Private SubWorksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Range ("B47").Value <> "" Then
Me.Totalvalue.Visible = True
Else
Me.Totalvalue.Visible = False
End If
Application.ScreenUpdating = True
End Sub
Using the button brings up a message box. Message box displays the content and number of the specified cell.
After closing the message box, the spreadsheet cells are inactive. It is not possible to edit the data.
Only form controls, activeX controls, and drop-down lists are active. The delete and escape keys also help. However, using esc exits full screen mode.
Interestingly, this problem does not occur unless the sheet is in full screen mode.
Please help me and indicate what may cause the problem of blocking cell editing
I made these last changes in another file and everything works fine. Unfortunately, the file with the problem is too extensive (formulas, macros, userforms, conditional formatting) for me to do it from scratch
See stackoverflow answers at vba - Excel Full screen mode can't edit cell
Basically the solutions there suggest selecting another sheet then going back to your selected sheet. You can do this in code.
Some locations will experience issues with ActiveX controls depending on version and update status of Windows - I removed all ActiveX controls from our EUC for this reason (replaced with Forms controls)
Finally - is this full screen on your main monitor - some strange behaviours can also occur if you have full screen on an extended monitor - buttons may work on one screen but not the other (strange but true)
EDIT: To answer your questions in your comment below
Yes it is possible to hide a Form Control Button on a sheet e.g. if I have a button I have named "btnNamed"
You can also refer to the button by index 1, 2 etc. Not sure how that relates to this question though.
I never suggested using
Range("A1").ClearContentsso I can't help you with that. I can't see how that could possibly work.If a
MsgBoxis still on the screen then editing will be blocked until you have dismissed theMsgBoxI.e. the user has hit Enter or Esc.The accepted solution on the link I gave above does not mention the delete key nor the formula bar. It suggests selecting another sheet, then going back to your original sheet e.g.