Elargir Zone de Nom [ Info VBA Excel ] - VB/VBA/VBS - Programmation
MarshPosté le 16-06-2006 à 01:08:20
Qqch que j'ai longtemps cherché et enfin trouvé sur un site US Comment élargir la Zone de Nom.
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
Marsh Posté le 16-06-2006 à 01:08:20
Qqch que j'ai longtemps cherché et enfin trouvé sur un site US
Comment élargir la Zone de Nom.
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
Sous 2007 cette zone est modifiable manuellement
Message édité par kiki29 le 24-06-2007 à 19:11:33