Public Sub Ajudante6(ByRef NomeForm As Object)
Dim frm As UserForm
Dim i As Long
''For i = 1 To ThisWorkbook.VBProject.VBComponents.Count
''If ThisWorkbook.VBProject.VBComponents(i).Name = NomeForm Then
Set frm = NomeForm
'=======================================================
'DESABILITAR CAIXAS DE TEXTO
'=======================================================
Dim ctrl As control
For Each ctrl In frm.Controls
If TypeName(ctrl) = "TextBox" And ctrl.Name <> "txtPesquisa" Then
ctrl.Enabled = False
End If
Next ctrl
' 'Exit For
' End If
' 'Next i
End Sub
Anderson Diniz