Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Apple to Orange


Well not quite - but nearly. (In addendum to prev thread)

I have 5 multiselect listboxes on a userform. I want to retreive
results of all boxes to a seperate range on a worksheet. So far I
have....

Sub EvaluateListboxes()
Dim moctBox As Control
For Each moctBox In MainMenu.Controls
If TypeName(moctBox) = XL_MENU_LISTBOX Then
RetrieveList moctBox
End If
Next moctBox
End Sub

Sub RetrieveList(ByVal mlstBox As Variant)
Dim lngIndex As Long
With mlstBox
For lngIndex = 0 To .ListCount - 1
If .Selected(lngIndex) Then
MsgBox .List(.lngIndex)
End If
Next lngIndex
End With
End Sub

the problem is that .listcount is only a property of a listbox not a
control. Yet you can only cycle thru the listboxes on a form using
controls? How do I turn my proverbial apple into an orange?

CIA,
Matt.


--
MattShoreson
------------------------------------------------------------------------
MattShoreson's Profile: http://www.excelforum.com/member.php...fo&userid=3472
View this thread: http://www.excelforum.com/showthread...hreadid=378564

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Apple to Orange


there was a dot infront of lngIndex

MsgBox .List(.lngIndex) should be MsgBox .List(lngIndex

--
MattShoreso
-----------------------------------------------------------------------
MattShoreson's Profile: http://www.excelforum.com/member.php...nfo&userid=347
View this thread: http://www.excelforum.com/showthread.php?threadid=37856

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
Changing font colour to red & orange DDD Excel Discussion (Misc queries) 1 February 1st 09 11:58 AM
Help, How do I create apple to apple and apple to orange charts Jillianbs Charts and Charting in Excel 2 May 2nd 08 09:58 PM
How do I add another color to the choices in Excel (I need orange lynyantz Excel Discussion (Misc queries) 1 August 2nd 06 04:29 PM
How do I change the orange color of the grid address highlight? 140WWR068512232 Excel Discussion (Misc queries) 3 June 14th 05 03:30 AM
oRange.Interior.Color Vasant Nanavati[_2_] Excel Programming 3 July 13th 03 08:28 AM


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