sadney 发表于 2006-12-15 18:34:37

[VBA函数]:vba多段线循环

我想用多段线做一关系曲线(库容曲线)怎么样做个循环?不必要像这样

points(0) =xlsheet.cells(8, 8).Value: points(1) =xlsheet.cells(8, 1).Value
points(2) =xlsheet.cells(9, 8).Value: points(3) =xlsheet.cells(9, 1).Value
points(4) =xlsheet.cells(10, 8).Value: points(5) =xlsheet.cells(10, 1).Value
points(6) =xlsheet.cells(11, 8).Value: points(7) =xlsheet.cells(11, 1).Value
points(8) =xlsheet.cells(12, 8).Value: points(9) =xlsheet.cells(12, 1).Value
points(10) =xlsheet.cells(13, 8).Value: points(11) =xlsheet.cells(13, 1).Value
points(12) =xlsheet.cells(14, 8).Value: points(13) =xlsheet.cells(14, 1).Value
points(14) =xlsheet.cells(15, 8).Value: points(15) =xlsheet.cells(15, 1).Value
points(16) =xlsheet.cells(16, 8).Value: points(17) =xlsheet.cells(16, 1).Value
points(18) =xlsheet.cells(17, 8).Value: points(19) =xlsheet.cells(17, 1).Value
points(20) =xlsheet.cells(18, 8).Value: points(21) =xlsheet.cells(18, 1).Value
points(22) =xlsheet.cells(19, 8).Value: points(23) =xlsheet.cells(19, 1).Value
points(24) =xlsheet.cells(20, 8).Value: points(25) =xlsheet.cells(20, 1).Value
points(26) =xlsheet.cells(21, 8).Value: points(27) =xlsheet.cells(21, 1).Value
points(28) =xlsheet.cells(22, 8).Value: points(29) =xlsheet.cells(22, 1).Value
points(30) =xlsheet.cells(23, 8).Value: points(31) =xlsheet.cells(23, 1).Value
points(32) =xlsheet.cells(24, 8).Value: points(33) =xlsheet.cells(24, 1).Value
points(34)=xlsheet.cells(25, 8).Value: points(35)=xlsheet.cells(25, 1).Value
points(36)=xlsheet.cells(26, 8).Value: points(37)=xlsheet.cells(26, 1).Value
points(38)=xlsheet.cells(27, 8).Value: points(39)=xlsheet.cells(27, 1).Value
points(40)=xlsheet.cells(28, 8).Value: points(41)=xlsheet.cells(28, 1).Value
页: [1]
查看完整版本: [VBA函数]:vba多段线循环