Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" _
(ByVal hWnd1 As Long, ByVal hWnd2 As Long, _
ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As Long, ByVal wMsg As Long, _
ByVal wParam As Long, lParam As Any) As Long
Private Sub ElargirZoneNom()
Dim Res As Long
Const CB_SETDROPPEDWIDTH = &H160
Const cWidth = 200 '<<<<<<<
Res = SendMessage(FindWindowEx(FindWindowEx(FindWindow("XLMAIN", Application.Caption) _
, 0, "EXCEL;", vbNullString), 0, "combobox", vbNullString), CB_SETDROPPEDWIDTH, cWidth, 0)
End Sub
Sub Auto_Open()
ElargirZoneNom
End Sub
|