Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using ShowScrollBar API call in VBA?
I'm in a situation where I need to use the VBA Listbox control to show 1 piece of data per row, but store 3 pieces of data. After a futile attempt at trying to attach a custom object to each list item, I'm now attempting to use 3 columns, but hiding column 2-3, by making column 1 as wide as the listbox and hiding the horizontal scrollbar that appears.
I found an API function for this, but VBA complains about the nonexisting .hwnd property. Private Declare Function ShowScrollBar Lib "user32" (ByVal hwnd As Long, ByVal wBar As Long, ByVal bShow As Long) As Long Private Const SB_HORZ = 0 ' Horizontal Scrollbar Private Const SB_VERT = 1 ' Vertical Scrollbbar Private Const SB_BOTH = 3 ' Both ScrollBars .... ShowScrollBar Listbox1.hwnd, SB_HORZ, False Any ideas? Gustaf |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Wouldn't know what to call it! | Excel Worksheet Functions | |||
How to call this DLL? | Excel Programming | |||
I'm not sure what you'd call it, but is it possible to do this? | Excel Discussion (Misc queries) | |||
Call Center Management: How to calculate 'cost per call' | Excel Discussion (Misc queries) | |||
How do you call one Sub from another Sub ? | Excel Programming |