We help IT Professionals succeed at work.

How to prevent editing of Treeview text

LeighWardle
LeighWardle used Ask the Experts™
on
Hi Experts,

How can I prevent editing of the text of any item in a Treeview?
My sample project is attached.

Regards,
Leigh
v13.1.3.zip
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Add the following sub to the frmTreeview Form :

Private Sub tvTreeView_BeforeLabelEdit(Cancel As Integer)
    Cancel = True
End Sub

Author

Commented:
Thanks again, vb_elmar.

Regards,
Leigh