Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Urgent: How to use CheckBoxes in ListBox

Hello,

I am going crazy because I try to access the Value of a checkbox. Here is
what I do:

* Create a ListBox control
* Set ListBox.ListStyle to fmListStyleOption
* Set ListBox.MultiSelect to fmMultiSelectMulti

This results in a control with checkboxes in front of all list elements. The
checkboxes can be checked/unchecked with the mouse. However, I cannot out
the code needed to

* read the state of the checkbox
* set the state of the checkbox in code

I have been reading the VBA Help for hours now but could not figure out how
to do this. I am begging for your help.

Cheers,

Oliver



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Urgent: How to use CheckBoxes in ListBox

Oliver,

This should get you started

With ListBox1
For i = 0 To .ListCount - 1
If .Selected(i) = True Then
MsgBox .List(i) & " is selected"
End If
Next i
End With


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Mr. T" wrote in message
s.com...
Hello,

I am going crazy because I try to access the Value of a checkbox. Here is
what I do:

* Create a ListBox control
* Set ListBox.ListStyle to fmListStyleOption
* Set ListBox.MultiSelect to fmMultiSelectMulti

This results in a control with checkboxes in front of all list elements.

The
checkboxes can be checked/unchecked with the mouse. However, I cannot out
the code needed to

* read the state of the checkbox
* set the state of the checkbox in code

I have been reading the VBA Help for hours now but could not figure out

how
to do this. I am begging for your help.

Cheers,

Oliver





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
IME MODE FOR EXCEL 2007 (URGENT URGENT) Stella Wong Excel Discussion (Misc queries) 1 August 23rd 08 11:16 PM
listbox B conditional of input in Listbox A Kim K Excel Discussion (Misc queries) 1 October 31st 06 08:27 PM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM
Enabling checkboxes in a listbox control Tokash Excel Programming 0 October 9th 03 01:07 AM
Is refreshing listbox rowsource in listbox click event possible? Jeremy Gollehon[_2_] Excel Programming 4 September 25th 03 06:45 PM


All times are GMT +1. The time now is 09:49 AM.

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"