Object reference

  • Thread starter Thread starter Luis Caeiro
  • Start date Start date
L

Luis Caeiro

Hi,

I have a form that have 64 objects, named c1 up to c64.
My point is: Is there a way to go to a specified object, ex: c35, using a
variable to built the reference?

ex:
I'd like to change c35 object position. So,

x=35
POSX = "c"+STR(x)+".LEFT=1000"

so,
POSX would be "c35.left=1000"



How can I execute the command in the POSX string?

I have tried RunCommand and CommandExecute, but none worked.



Thanks,
Luis
 
Hi Luis,

I'm not sure what POSX is in your example but if you are trying to change
the position of controls c1 through c64 you can easily do this with the
following:

dim intI as integer

for intI=1 to 64
me.controls("C" & inti).left=1000
next inti
 
Back
Top