excel - VBA - "Wrong number of arguments or invalid property assignment" - Cells() -
following tutorial arrays on vba excel. can see, commented out , still error. if use range("a1", "a1").value = 1 there's no problem. noticed intelisense doesn't pick 'cells('
option explicit sub arraytest() 'dim arrayint(1 5) integer 'dim integer 'dim j integer ' j = 1 ubound(arrayint) ' arrayint(j) = 10 * j ' next j ' = ubound(arrayint) cells(1, 1).value = 1 'arrayint(i) ' next end sub
try using application
, check if intellisense
picks cells
property.
if so, replace code this:
application.cells(1, 1).value = 1
Comments
Post a Comment