How to drag some objects and forms in VBA/Excel and prevent the drag of others?

Asked

Viewed 583 times

0

I’m having difficulties when trying to control "drag forms" and "drag objects" in VBA/Excel.

For example: I have the main form that I don’t want to be moved, a second form is called from the main form and can be moved, and I have certain objects that I need to move in it (images, e. g.), and then I want to go back to the main form.

How do I do?

1 answer

1


To prevent dragging, paste into your form code

Private Sub Userform_layout() Me.Move 350, 282 End Sub

Browser other questions tagged

You are not signed in. Login or sign up in order to post.