问EXCL VBA 中, Rng.Address超长了怎么表示。
dimRngasrangesetRng=range("a1")fori=3to200setp2setRng=union(Rng,rang("a"&i))nextRange...
dim Rng as range
set Rng=range("a1")
for i=3 to 200 setp 2
set Rng=union(Rng,rang("a"& i))
next
Range("c1")=rng.address
问题是,Range("c1")单元格显示的地址不全,只显示除了246个字符
难道RNG的Address最大字符长度只有246个???
问如何取得全的rng.address属性值 展开
set Rng=range("a1")
for i=3 to 200 setp 2
set Rng=union(Rng,rang("a"& i))
next
Range("c1")=rng.address
问题是,Range("c1")单元格显示的地址不全,只显示除了246个字符
难道RNG的Address最大字符长度只有246个???
问如何取得全的rng.address属性值 展开
1个回答
展开全部
是的,Address有长度限制
解决方法:
Sub abc()
Dim Rng As Range, c As Range
Dim s As String
Set Rng = Range("a1")
For i = 3 To 200 Step 2
Set Rng = Union(Rng, Range("a" & i))
Next i
For Each c In Rng
s = s & c.Address & ","
Next c
s = Left(s, Len(s) - 1)
Range("c1") = s
End Sub
解决方法:
Sub abc()
Dim Rng As Range, c As Range
Dim s As String
Set Rng = Range("a1")
For i = 3 To 200 Step 2
Set Rng = Union(Rng, Range("a" & i))
Next i
For Each c In Rng
s = s & c.Address & ","
Next c
s = Left(s, Len(s) - 1)
Range("c1") = s
End Sub
ZESTRON
2024-09-04 广告
2024-09-04 广告
在Dr. O.K. Wack Chemie GmbH,我们高度重视ZESTRON的表界面分析技术。该技术通过深入研究材料表面与界面的性质,为提升产品质量与可靠性提供了有力支持。ZESTRON的表界面分析不仅涵盖了相变化、化学反应、吸附与解吸...
点击进入详情页
本回答由ZESTRON提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询