>Lets say I'm wanting to set the color of a shape in a graphical >representation of some data. I have a mask to tell me what to do... > >for lnCnt = 1 to SliderPosition > for lnCnt2 = 1 to SomeNumberOfShapes > if occurs("T", lcCurMask) > 0 > lcCommand = "this.Object"+allt(str(lnCnt-lnSlider+1))+; > ".shape"+allt(str(lnCnt2))+".visible = .T." > &lcCommand > lcCommand = "this.Object"+allt(str(lnCnt-lnSlider+1))+; > ".shape"+allt(str(lnCnt2))+".backcolor = rgb(0,255,0)" > &lcCommand > endif > endfor >endfor > >>
loCtrl = "this.Object"+allt(str(lnCnt-lnSlider+1))+".shape"+allt(str(lnCnt2)) with loCtrl .visible = .T. .backcolor = rgb(0,255,0) endwithNot saying this is better or worse, but the original post was to say macro expansion could be avoided.