简体   繁体   English

单击/激活ActiveX控件会锁定Excel单元格

[英]Clicking/activating ActiveX control locks excel cell

I am encountering a small difficulty with an excel file I am working on. 我正在使用的excel文件遇到一个小困难。 When moving from one sheet to another, the new activated sheet is sometimes locked in that sense that I can't make keyboard inputs. 当从一张纸移动到另一张纸时,新激活的纸有时会因为无法进行键盘输入而被锁定。 This seems to be the consequence of a interacting with a combobox or a listbox. 这似乎是与组合框或列表框进行交互的结果。

The issue also arises when I first click on the control and then try to change the content of the unlocked cell of the protected sheet. 当我先单击控件,然后尝试更改受保护工作表的未锁定单元格的内容时,也会出现此问题。 When the sheet is unprotected, the issue does not arise. 当工作表不受保护时,不会出现此问题。

This seems to be resolved when I add this code on the control lostfocus event 当我在控件Lostfocus事件上添加此代码时,似乎可以解决此问题

debug.print selection.locked

Do ActiveX controls interfer with sheet protection or keyboard input (I can still use the dropdowns of those cell, select them with the mouse, etc.) Any clue of how to resolve this without adding this mysterious line? ActiveX控件会干扰工作表保护或键盘输入吗(我仍然可以使用这些单元格的下拉列表,或者使用鼠标进行选择,等等。)在不添加此神秘线的情况下如何解决此问题的任何线索? Thanks for your help! 谢谢你的帮助!

If you have the formula bar hidden just turn it visible. 如果您隐藏了编辑栏,只需将其显示即可。 I know it sounds wierd but it worked for me. 我知道这听起来很奇怪,但是对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM