From: Nobody on 27 Dec 2009 02:45 "Larry Serflaten" <serflaten(a)usinternet.com> wrote in message news:edp1X9rhKHA.2188(a)TK2MSFTNGP04.phx.gbl... > > "NC" <oceano.web.pt(a)netmadeira.com> wrote >> I have this portion of code: >> >> ReDim IMG_TB(0 To vtotfot - 1, vPaginas) > <...> >> I get stucked in this line >> >> IMG_TB(vpct, vpag).Picture = LoadPicture(NPOS_01.FIL_FOTOS.Path & "\" >> & >> NPOS_01.GRD_FOTOS.Text) >> >> VB allways says that an object is required > > > You have declared IMG_TB to be a 2D array of Variants, but you try to use > it as an array of Image controls. In short, a Variant does not have a > Picture > property.... Actually it's unclear what the data type is. If the data type was omitted, ReDim uses the same data type used when the variable was declared, and an error occurs if it's a different data type. If it was not declared before, then Variant is assumed, and no error is generated even if Option Explicit is used. However, it seems likely that the OP is using it as declarative statement and it's probably Variant.
From: Larry Serflaten on 27 Dec 2009 15:45
"Nobody" <nobody(a)nobody.com> wrote > However, it seems likely that the OP is using it as declarative > statement and it's probably Variant. OK: > > You have probably declared IMG_TB to be a 2D array ... :-P LFS |