TAB-key doesn't work after running macro

久未见 提交于 2020-01-15 13:34:15

问题


I have a sheet on which most cells are locked but a piece of the worksheet-cells is unlocked. I have a macro which does the following :

  • unlock the workbook
  • unlock the sheet
  • copy that single sheet in another workbook
  • save the new workbook somewhere and close it

Afterwards, the tab-key doesn't work anymore. It looks like the worksheets loosed the focus, but as soon as I start typing, the content comes in the cell.

When I select another workbook or another sheet in the original workbook, the tab-key is working again. (When I select another program and return to Excel, that is not enough to get it working again).

I already select and activate the original worksheet at the end of the macro, but that doesn't help.

activeworkbook.worksheets("rapport").activate
activeworkbook.worksheets("rapport").select

edit : I tried to isolate the problem, and it seems that it has nothing to do with the protection of the workbook or the worksheet. In a new thread, I give a description of the problem in a small workbook with a small macro.

来源:https://stackoverflow.com/questions/50391225/tab-key-doesnt-work-after-running-macro

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!