【发布时间】:2013-02-22 20:03:30
【问题描述】:
我正在尝试将 VBA 创建的数组打印到 Excel 电子表格的单元格中。渗透和径流值不断出现“下标超出范围”错误我是否正确创建软管阵列?我已经将计算和打印子功能合二为一了。
NumMonth = 12
Dim col As Long
Dim rw As Long
rw = 4
col = 13
Range(Cells(rw, col), Cells(rw + NumMonth - 1, col)).Value = _
Application.Transpose(WC)
Range(Cells(rw, col + 1), Cells(rw + NumMonth - 1, col + 1)).Value = _
Application.Transpose(Runoff)
Range(Cells(rw, col + 2), Cells(rw + NumMonth - 1, col + 2)).Value = _
Application.Transpose(Percolation)
End Sub
【问题讨论】:
-
能否提供一些示例数据?
-
月:1-12,参考 Et:0.4,降水:0.07,fc:0.3,pwp=0.1,WC(i)=0.15。我不知道提供数据的更好方法??