Make a IMAGE Move

G

Guest

Hi evry1

i have an image in a image control found on a userform. also on the userform
i have a few labels.(If these labels are clicked then a userform acting as an
inputbox are displayed). after having completed the inputboxform label2
should be selected. i need the image to move from label1 to label2 thru to
label10.

I'd prefer (if possible) a manner other than creating 10images i 10image
controls and setting them visible and invisile..

Plaese teach me how!!!!!!
 
B

Bernie Deitrick

Just set the top (and perhaps, the left) properties of the image to match the label, along the lines
of this. I hope you can see the pattern.....Of course, you can code it better than this ;-)


If ..... then
UserForm1.Image1.Top = UserForm1.Label1.Top
End if

If...Then
UserForm1.Image1.Top = UserForm1.Label2.Top
End if

If... then
UserForm1.Image1.Top = UserForm1.Label10.Top
End if

HTH,
Bernie
MS Excel MVP
 

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