View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen Per Jessen is offline
external usenet poster
 
Posts: 1,533
Default Lock userform for editing

Hi

You have to set the Enabled Property to False.

With the code below only CommandButton1 will be active on the form.

Private Sub UserForm_Initialize()
For Each fi In Me.Controls
If fi.Name < "CommandButton1" Then
fi.Enabled = False
End If
Next
End Sub

Hopes this helps.

---
Per

"Tendresse" skrev i meddelelsen
...
Is there a way to SHOW a userform as Read Only?
When the userform is initialized, its textboxes and checkboxes are already
populated with data from a worksheet. I don't want the users to change or
edit this data. I only want them to view it. Is it possible to lock the
form
for editing?
excel 2003
tendresse