Object reference

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
 
S

Sandra Daigle

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top