>Thank you
>
>Besides, I need to change the label caption as below
>
>thisform.labelmyLB.caption = "One"
>
>thisform.labelmyLB.caption = "Two"
>
>etc.
store 'Two' to ('thisform.Label' + myLb + '.caption) && Uses name expression
Using Christof's suggestion
oLabel = getpem('thisform','Label' + myLb)
with oLabel
oLabel.Caption = 'My new caption'
oLabel.Refresh()
endwith
If it's not broken, fix it until it is.
My Blog