Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Widen Data Validation Dropdown

I use Chip Pearson' very nifty WidenNameBox macro to resize the name box for
viewing longer defined names. Is it possible to modify this macro to work
with the Data Validation drop down?
It's frustrating at be limited to the width of the cell (which in my current
sheet is only 24 points), and using comboboxes wouldn't be ideal as I have
over 6000 rows and 5 columns which contain dropdowns.

The original macro is below.
Yours in possibly futile hope, Darren
--------------------------
The macro is:

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


Sub WidenNameBoxDrop2()

Dim Res As Long
Const CB_SETDROPPEDWIDTH = &H160
Const cWidth = 300 '<<<<<<<<<<<<<<<<<<<<<<
Res = SendMessage( _
FindWindowEx( _
FindWindowEx( _
FindWindow("XLMAIN", Application.Caption) _
, 0, "EXCEL;", vbNullString) _
, 0, "combobox", vbNullString), _
CB_SETDROPPEDWIDTH, cWidth, 0)

End Sub






  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Widen Data Validation Dropdown

No.

--
Regards,
Tom Ogilvy

Darren Hill wrote in message
...
I use Chip Pearson' very nifty WidenNameBox macro to resize the name box

for
viewing longer defined names. Is it possible to modify this macro to work
with the Data Validation drop down?
It's frustrating at be limited to the width of the cell (which in my

current
sheet is only 24 points), and using comboboxes wouldn't be ideal as I have
over 6000 rows and 5 columns which contain dropdowns.

The original macro is below.
Yours in possibly futile hope, Darren
--------------------------
The macro is:

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


Sub WidenNameBoxDrop2()

Dim Res As Long
Const CB_SETDROPPEDWIDTH = &H160
Const cWidth = 300 '<<<<<<<<<<<<<<<<<<<<<<
Res = SendMessage( _
FindWindowEx( _
FindWindowEx( _
FindWindow("XLMAIN", Application.Caption) _
, 0, "EXCEL;", vbNullString) _
, 0, "combobox", vbNullString), _
CB_SETDROPPEDWIDTH, cWidth, 0)

End Sub








  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Widen Data Validation Dropdown

You could use a SelectionChange event to temporarily widen the column.
There are some instructions he

http://www.contextures.com/xlDataVal08.html#Wider

Darren Hill wrote:
I use Chip Pearson' very nifty WidenNameBox macro to resize the name box for
viewing longer defined names. Is it possible to modify this macro to work
with the Data Validation drop down?
It's frustrating at be limited to the width of the cell (which in my current
sheet is only 24 points), and using comboboxes wouldn't be ideal as I have
over 6000 rows and 5 columns which contain dropdowns.

The original macro is below.
Yours in possibly futile hope, Darren
--------------------------
The macro is:

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


Sub WidenNameBoxDrop2()

Dim Res As Long
Const CB_SETDROPPEDWIDTH = &H160
Const cWidth = 300 '<<<<<<<<<<<<<<<<<<<<<<
Res = SendMessage( _
FindWindowEx( _
FindWindowEx( _
FindWindow("XLMAIN", Application.Caption) _
, 0, "EXCEL;", vbNullString) _
, 0, "combobox", vbNullString), _
CB_SETDROPPEDWIDTH, cWidth, 0)

End Sub



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Widen Data Validation Dropdown


Lol, thought that might be the case. Thanks anyway :)
--
Darren
"Tom Ogilvy" wrote in message
...
No.

--
Regards,
Tom Ogilvy

Darren Hill wrote in message
...
I use Chip Pearson' very nifty WidenNameBox macro to resize the name box

for
viewing longer defined names. Is it possible to modify this macro to

work
with the Data Validation drop down?
It's frustrating at be limited to the width of the cell (which in my

current
sheet is only 24 points), and using comboboxes wouldn't be ideal as I

have
over 6000 rows and 5 columns which contain dropdowns.

The original macro is below.
Yours in possibly futile hope, Darren
--------------------------
The macro is:

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


Sub WidenNameBoxDrop2()

Dim Res As Long
Const CB_SETDROPPEDWIDTH = &H160
Const cWidth = 300 '<<<<<<<<<<<<<<<<<<<<<<
Res = SendMessage( _
FindWindowEx( _
FindWindowEx( _
FindWindow("XLMAIN", Application.Caption) _
, 0, "EXCEL;", vbNullString) _
, 0, "combobox", vbNullString), _
CB_SETDROPPEDWIDTH, cWidth, 0)

End Sub










  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Widen Data Validation Dropdown


Thanks, that's a great workaround. :)

--
Darren
"Debra Dalgleish" wrote in message
...
You could use a SelectionChange event to temporarily widen the column.
There are some instructions he

http://www.contextures.com/xlDataVal08.html#Wider

Darren Hill wrote:
I use Chip Pearson' very nifty WidenNameBox macro to resize the name box

for
viewing longer defined names. Is it possible to modify this macro to

work
with the Data Validation drop down?
It's frustrating at be limited to the width of the cell (which in my

current
sheet is only 24 points), and using comboboxes wouldn't be ideal as I

have
over 6000 rows and 5 columns which contain dropdowns.

The original macro is below.
Yours in possibly futile hope, Darren
--------------------------
The macro is:

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


Sub WidenNameBoxDrop2()

Dim Res As Long
Const CB_SETDROPPEDWIDTH = &H160
Const cWidth = 300 '<<<<<<<<<<<<<<<<<<<<<<
Res = SendMessage( _
FindWindowEx( _
FindWindowEx( _
FindWindow("XLMAIN", Application.Caption) _
, 0, "EXCEL;", vbNullString) _
, 0, "combobox", vbNullString), _
CB_SETDROPPEDWIDTH, cWidth, 0)

End Sub



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to write in a dropdown data(Validation) [email protected] Excel Discussion (Misc queries) 2 January 3rd 10 02:41 PM
Data validation with dropdown list geotso Excel Discussion (Misc queries) 2 February 1st 09 05:59 PM
Dropdown lists from datavalidation. MichaelZ Excel Discussion (Misc queries) 3 October 21st 08 02:31 PM
Dynamic Data Series Selection from Data Validation Dropdown? Kris S Charts and Charting in Excel 1 May 23rd 08 11:17 PM
blanks in data validation list dropdown confused Excel Worksheet Functions 7 June 7th 06 02:10 PM


All times are GMT +1. The time now is 03:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"