Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

list property of listbox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
x taol - 20 Jan 2006 12:50 GMT
please see the code below

sub btn_click()
'lis == listbox control in userform
set rng = range("a2:a5")
lis.list=rng.value 'it's ok
set rng = range("a2")
lis.list = rng.value 'it' not ok

'how can i ??
'i don't want to use "additem".

end sub
Dave Peterson - 20 Jan 2006 18:04 GMT
If rng.Cells.Count > 1 Then
   lis.List = rng.Value
Else
   lis.List = Array(rng.Value)
End If

> please see the code below
>
[quoted text clipped - 11 lines]
>
> *** Sent via Developersdex http://www.developersdex.com ***

Signature

Dave Peterson

x taol - 20 Jan 2006 19:39 GMT
please is it possible making with one syntex without if statement?

for example

lst.List = ~~~~
Dave Peterson - 20 Jan 2006 19:50 GMT
isn't .list expecting an array?

> please is it possible making with one syntex without if statement?
>
[quoted text clipped - 3 lines]
>
> *** Sent via Developersdex http://www.developersdex.com ***

Signature

Dave Peterson

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.