关于VB的一个问题
大佬问个问题,VB的subDimrngAsRangeSetrng=ActiveSheet.UsedRange.RowsMsgBoxrng.Addressa=Mid(rng...
大佬问个问题,VB的
sub
Dim rng As Range
Set rng = ActiveSheet.UsedRange.Rows
MsgBox rng.Address
a = Mid(rng.Address, 7, 1)
b = Mid(rng.Address, 9, 3)
' 下一步我想让c = a + b,请问怎么实现?
MsgBox c
end sub 展开
sub
Dim rng As Range
Set rng = ActiveSheet.UsedRange.Rows
MsgBox rng.Address
a = Mid(rng.Address, 7, 1)
b = Mid(rng.Address, 9, 3)
' 下一步我想让c = a + b,请问怎么实现?
MsgBox c
end sub 展开
展开全部
sub
Dim rng As Range
Set rng = ActiveSheet.UsedRange.Rows
MsgBox rng.Address
a = Mid(rng.Address, 7, 1)
b = Mid(rng.Address, 9, 3)
' 下一步我想让c = a + b,请问怎么实现?
c=a+b '这为直接连接起来。选用这一行,或选用下一行:
c=Val(a)+Val(b) '两个数字相加
MsgBox c
end sub
Dim rng As Range
Set rng = ActiveSheet.UsedRange.Rows
MsgBox rng.Address
a = Mid(rng.Address, 7, 1)
b = Mid(rng.Address, 9, 3)
' 下一步我想让c = a + b,请问怎么实现?
c=a+b '这为直接连接起来。选用这一行,或选用下一行:
c=Val(a)+Val(b) '两个数字相加
MsgBox c
end sub
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询