VBA自动改变.Range到.range [英] VBA automatically changing .Range to .range

查看:171
本文介绍了VBA自动改变.Range到.range的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在写一个Excel宏来帮我处理数据的工作,而现在我已经写完了code我不断收到错误,因为微软的Visual Basic不断变化.Range到.range。当它这样做,我得到一个编译错误,因为该方法不存在。

I have been writing an Excel macro to help me process data at work, and now that I have finished writing the code I keep getting errors because Microsoft Visual Basic keeps changing .Range to .range. Whenever it does this I get a compile error because the method doesn't exist.

反正是有解决这一问题?有没有办法来解决使用.Ra​​nge如果没有?只要我的code状态越来越从.Range改为.range它会继续在这里随地吐痰的错误。

Is there anyway to fix this? Is there a way to get around using .Range if there isn't? As long as my code keeps getting changed from .Range to .range it will keep spitting out errors here.

解决:没有根植于preceded它的方法,但数据成员误差

SOLVED: the error wasn't rooted in the method but the data member that preceded it.

推荐答案

编辑:O.P.说:

解决:没有根植于方式,但preceded它的数据成员的错误

然而,小写的方法的相关问题可以来自创建了您命名为范围,系统会根据这一定义自动变化情况的变量或程序。你不应该创建一个变量或程序具有相同的名称像 A定义的流程范围()
正如@RubberDuck提到的:

However, the related issues of a lowercase method can come from creating a variable or routine which you named range and the system will auto change case based on that definition. You should never create a variable or routine with the same name as a defined process like Range(). As mentioned by @RubberDuck:

这是VB是不区分大小写的副作用和IDE试图成为有用

这篇关于VBA自动改变.Range到.range的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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