How to drag some objects and forms in VBA / Excel and prevent others from dragging?

I am having difficulty trying to control the "drag forms" and "drag objects" in VBA/Excel.

For example: I have the main form that I do not want to be moved, a second form is called from the main one 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 it?

Author: Leo, 2015-12-08

1 answers

To prohibit dragging, paste into your form code

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

 1
Author: durtto, 2015-12-09 11:15:18