View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Souny Souny is offline
external usenet poster
 
Posts: 40
Default Question on Form Textboxes

Hello all,

In every worksheet of my Excel file, I have Form type Text Boxes. I need
help with activating the Locked Text of those text boxes when I click on the
command button. Could you please help me?

Below is the code I currently have, and it's not working.

Dim objT As OLEObject
Dim sh As Worksheet
For Each sh In Activeworkbook.Worksheets
For Each objT In sh.OLEObjects
If objT.OLEType = xlOLEEmbed Then
objT.LockedText = True
End If
Next objT
Next sh

Thanks.