Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ard Ard is offline
external usenet poster
 
Posts: 1
Default listbox control in VBA

in a multi-column listbox I want to set column headers. There is a property ColumnHeads which I set to true, but everything I have tried ended up with the intended header text being displayed as the first data row, and the actual headers remained blank

Anyone who knows how to do this, or even better, has actually done something similar??

I use Excel version 10 (Excel 2002) for development, but the application must work in version 8 (Excel 97) or later version

From the Microsoft Excel Visual Basic Referenc

"ColumnHeads Propert


Displays a single row of column headings for list boxes, combo boxes, and objects that accept column headings

Synta

object.ColumnHeads [= Boolean

The ColumnHeads property syntax has these parts

Part Description
object Required. A valid object.
Boolean Optional. Specifies whether the column headings are displayed.

Setting

The settings for Boolean are

Value Description
True Display column headings.
False Do not display column headings (default).

Headings in combo boxes appear only when the list drops down

Remark

When the system uses the first row of data items as column headings, they can't be selected"
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default listbox control in VBA

The column heads are the row above your rowsource or listfill range
property. So if your data is in A1:C20 for example, with column headings in
Row 1, you would set your rowsource or listfill range property to A2:C20 and
set ColumnHeads to true.

--
Regards,
Tom Ogilvy

"Ard" (without_this_trailer ) wrote in message
...
in a multi-column listbox I want to set column headers. There is a

property ColumnHeads which I set to true, but everything I have tried ended
up with the intended header text being displayed as the first data row, and
the actual headers remained blank.

Anyone who knows how to do this, or even better, has actually done

something similar???

I use Excel version 10 (Excel 2002) for development, but the application

must work in version 8 (Excel 97) or later versions

From the Microsoft Excel Visual Basic Reference

"ColumnHeads Property


Displays a single row of column headings for list boxes, combo boxes, and

objects that accept column headings.

Syntax

object.ColumnHeads [= Boolean]

The ColumnHeads property syntax has these parts:

Part Description
object Required. A valid object.
Boolean Optional. Specifies whether the column headings are displayed.


Settings

The settings for Boolean a

Value Description
True Display column headings.
False Do not display column headings (default).


Headings in combo boxes appear only when the list drops down.

Remarks

When the system uses the first row of data items as column headings, they

can't be selected"


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
Shrinking Listbox from Control Toolbox kumik5000 Excel Discussion (Misc queries) 3 December 5th 08 09:11 PM
Wrap text in a control listbox DavidS Excel Discussion (Misc queries) 4 April 22nd 08 06:39 PM
Control ToolBox ListBox Irratic Phil Hageman[_3_] Excel Programming 0 January 12th 04 06:37 PM
Control Toolbox ListBox Properties Blank pjhageman[_12_] Excel Programming 2 January 12th 04 03:51 PM
Enabling checkboxes in a listbox control Tokash Excel Programming 0 October 9th 03 01:07 AM


All times are GMT +1. The time now is 01:45 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"