• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 404
  • Last Modified:

Stop userform moving - Visual basic

How can i prevent a userform being 'dragged' or moved in visual basic? i have office 2007, visual basic 6.5. I have read there is a "movable" property whch i could change to false, however i cannot see it. Anybody able to help?!

Many Thanks
0
Didsi
Asked:
Didsi
  • 5
  • 4
  • 2
  • +1
1 Solution
 
ExcelGuideConsultantCommented:
0
 
utter77Commented:
Hi. in vb6.0 you have a property on the form, Moveable. Set it to False.

/MAtt
0
 
DidsiAuthor Commented:
cant find the moveable option!
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
Chris BottomleyCommented:
Hello Didsi,

Right click on teh form and select properties.

In teh properties window in the editor you can scroll down in teh alphabetic tab until the moveable proerty is displayed.  DOuble clicking in the adjacent window will toggle between true and false.  A value of false prevents the form being moved.

Regards,

chris_bottomley
0
 
DidsiAuthor Commented:
The moveable property is not there, do i have to do as psycotec said and create a class or is there a way of showing the moveable property
0
 
utter77Commented:
Can you set the property in form_load?

Me.Moveable = false
0
 
Chris BottomleyCommented:
WHat kind of VB project are you creating?

Chris
0
 
DidsiAuthor Commented:
"userform_load
Me.Moveable = False"      Does not work.

The VB project is a signing in/out system. Dont want the user to be able to move the userform
0
 
Chris BottomleyCommented:
In the VB editor, click project | properties.

What is displayed in the General tab for the project type?  Note I have no sight of a cause as yet just trying to understand the setup to try and reproduce your obervation.

Chris
0
 
DidsiAuthor Commented:
Do you mean right click and properties on the VBA prject, if so the theres is no project type tab
0
 
Chris BottomleyCommented:
I see now you are referring to VBA not VB sorry I missed that - I don't think you can freeze the position of a VBA form but i'll look a while and maybe someone will have an idea.

Chris
0
 
DidsiAuthor Commented:
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

  • 5
  • 4
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now