简体   繁体   English

如何在 Excel VBA 代码编辑器中关闭自动大写

[英]How to turn off auto-capitalization in Excel VBA code editor

I've moved from Mac to Windows for some programming.我已经从 Mac 转移到 Windows 进行一些编程。 And in my workbook I have a sheet named 'data'.在我的工作簿中,我有一个名为“数据”的工作表。 But as I try to select this sheet using the code 'Sheets(data).Select', whenever I move my cursor of the word 'data' it will autocapitalize to 'Data'.但是,当我尝试使用代码“Sheets(data).Select”选择此工作表时,每当我移动“data”一词的光标时,它都会自动大写为“Data”。 It does this with all kinds of stuff and I simply cannot find a way to type the code with small letters.它可以用各种各样的东西来做到这一点,我根本找不到一种用小写字母输入代码的方法。

I turned off all autocorrect options in Excel's options but without luck.我关闭了 Excel 选项中的所有自动更正选项,但没有运气。

To control how variables appear in your code, you should declare them.要控制变量在代码中的显示方式,您应该声明它们。 For example:例如:

Dim data As Object

If you don't declare them and you initial type them with a capital letter.如果您不声明它们并且用大写字母初始键入它们。 The editor will remember this and use this format going forward.编辑器会记住这一点并继续使用这种格式。 The only way I've found to overwrite this is to declare them.我发现覆盖它的唯一方法是声明它们。

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

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