VBA Tab键将实际的Tab值放在文本框中,而不是导航到下一个控件 [英] VBA Tab Key putting actual Tab Value in Text Box instead of navigating to next control

查看:186
本文介绍了VBA Tab键将实际的Tab值放在文本框中,而不是导航到下一个控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个VBA表单(如果重要的话,在Excel中),其中包含文本框.

I have a VBA form (in Excel if that matters) that contains text boxes.

在三种情况下,我发现自己已按Tab键导航到下一个控件,但实际上在文本框中放置了TAB.

On three occasions, I have found myself pressing the tab key to navigate to the next control, but instead an actual TAB is being put in the text box.

该表格通常可以正常工作,但令我感到担忧的是,这颗格雷姆林偶尔会出现.

The form normally acts as it should, but it does concern me that this gremlin is showing up sporadically.

它已经出现在Office 2003和Office 2007的两台不同计算机上.

It has shown up on Office 2003 as well as Office 2007 on two different computers.

还有其他人遇到过此问题吗?如果是,您如何解决此问题?

Has anyone else encountered this problem and, if so, how did you fix it?

推荐答案

通过启动Excel,立即拉出表单并按住Tab键,我能够100%地重现该问题.

I was able to reproduce the problem 100% of the time by launching Excel, immediately pulling up the form, and holding down the tab key.

如果我完全更改了表单中的任何代码并重新保存了工作簿,则问题就消失了.我将把这归结为VBA中的Fluke编译错误.

If I change any code at all in the form and resave the workbook, the problem goes away. I'm going to chalk this up to a fluke compilation error within VBA.

这篇关于VBA Tab键将实际的Tab值放在文本框中,而不是导航到下一个控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆