简单的问题我需要亲自动手:如何将字符串传递给Excel VBA中的范围对象?
示例代码:
Dim Trange As Range
Dim sAddress As String
Sub example
sAddress = "Output Averages!$C$23:$C$" & (23 + total)
Set Trange = Range(sAddress)
End Sub
收到错误:对象_Global的方法'范围'失败。运行时错误1004
答案 0 :(得分:0)
sAddress = "'Output Averages'!$C$23:$C$" & (23 + total)