Notifications
Clear all

Aumentando a largura da caixa de nomes de celulas

2 Posts
2 Usuários
0 Reactions
1,627 Visualizações
Bernardo
(@bernardo)
Posts: 1
New Member
 

Coloque o trecho abaixo em um modulo qualquer:

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long

Private 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

Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As Long, ByVal wMsg As Long, _
ByVal wParam As Long, lParam As Any) As Long

Sub WidenNameBoxDrop2()
Dim Res As Long
Const CB_SETDROPPEDWIDTH = 352
Const cWidth = 700 '< Change To Desire Width in Pixels
Res = SendMessage( _
FindWindowEx( _
FindWindowEx( _
FindWindow("XLMAIN", Application.Caption) _
, 0, "EXCEL;", vbNullString) _
, 0, "combobox", vbNullString), _
CB_SETDROPPEDWIDTH, cWidth, 0)
End Sub

Depois chame a rotina pelo Workbook_Open()
Call WidenNameBoxDrop2

abracos,

 
Postado : 23/07/2009 3:11 pm
Fernando Fernandes
(@fernandofernandes)
Posts: 43750
Illustrious Member
Topic starter
 

BOA dica !!!

valew !

Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel

 
Postado : 23/07/2009 5:59 pm