我创建了一个数组来存储一些excel单元格地址,但是在使用For循环遍历数组的一部分时(因为这些值是针对该部分数据的,并且比在一个位置执行每个操作更容易)时间),但在第22行出现错误(saData(i,1)=“ D”计数),就在“计数”变量处,但我不知道为什么。
'LOADING EXCEL CELL ADDRESS INTO INPUT ARRAY
saData(0,1) = "C3"
saData(1,1) = "F3"
saData(2,1) = "C4"
saData(3,1) = "F4"
saData(4,1) = "F6"
saData(5,1) = "C7"
saData(6,1) = "F7"
saData(7,1) = "C8"
saData(8,1) = "C9"
saData(9,1) = "F9"
saData(10,1) = "C11"
saData(12,1) = "F11"
saData(13,1) = "C13"
saData(14,1) = "F13"
Dim count : count = 16
For i = 15 to 54
saData(i,1) = "D" count
count = count + 1
next'
saData(55,1) = "G59"
saData(56,1) = "F60"
saData(57,1) = "B64"
saData(58,1) = "E64"
For i = 0 to 59
Msgbox saData(i,1)
next
答案 0 :(得分:0)
只需尝试串联saData(i,1) = "D"&count