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

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

问题描述

我一直在编写一个Excel宏来帮助我处理工作中的数据,现在我已经完成了编写代码,因为Microsoft Visual Basic不断变化。每当它这样做,我得到一个编译错误,因为该方法不存在。

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.

有没有办法解决这个问题?有没有办法绕过使用。如果没有的话。只要我的代码不断从.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.

解决方案:错误没有植根于该方法,但是

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

推荐答案

尝试将范围作为范围在您的代码中的某个地方(注意情况):

Try declaring Range as a Range somewhere in your code (note the case):

Dim Range As Range

然后删除该语句。

这应该将您所有的范围转换为范围

This should convert all your range to Range

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

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