Hi
I am trying to call this function but i am getting the
error Runtime error 438. Object doesnt support this
property or method.
Private Declare Function FindWindowEx Lib "User"
Alias "FindWindowExA" _
(ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal
lpsz1 As String, _
ByVal lpsz2 As String) As Long
Private Declare Function SendMessage Lib "User"
Alias "SendMessageA" _
(ByVal hwnd As Long, ByVal wMsg As Long, ByVal
wParam As Long, _
lParam As Any) As Long
Private Const EM_SETREADONLY = &HCF
Public Sub SetReadOnly(ByRef ObjX As Object, ObjBool As
Boolean)
Dim hwndEdit As Long
' Get edit field handle
**** I am getting error on this line. ***
hwndEdit = FindWindowEx(ObjX.hwnd, 0&, vbNullString,
vbNullString)
***** *******
If hwndEdit <> 0 Then
' Set or remove the ReadOnly flag (ES_ReadOnly)
SendMessage hwndEdit, EM_SETREADONLY, ObjBool, 0&
End If
End Sub
I am seeking immediate help..it will be great of u...
Regards
Amar