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 / Word / Programming / July 2005

Tip: Looking for answers? Try searching our database.

Listbox - run-time error 380

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jacobk - 09 Jul 2005 12:43 GMT
Hi,

I have made a form in VBA with 2 listboxes, lstSubrubriek and lstResult with
3 columns.
The selections the user made in lstSubrubriek I want to display in lstResult.
I've done this in a listbox, because the user can order the list in lstResult.

Rather I get the run-time error 380 'Invalid property array index'.
Can anyone help??

See sub below:

Private Sub lstSubrubriek_Change()

   Dim intRows As Integer
   Dim varItem As Variant
   
   Set lst = lstSubrubriek
   intRows = lst.ListCount - 1
   LstResult.Clear

   For varItem = 0 To intRows

       If lst.Selected(varItem) = True Then
           With LstResult
            .Column(0, varItem) = Nz(lst.Column(0, varItem))
         ' ** Gives Run-time error 380 Invalid property array index **
           End With
       End If
   Next

End Sub

Thanks a lot!!

JacobK.
Cindy M  -WordMVP- - 10 Jul 2005 17:04 GMT
Hi =?Utf-8?B?amFjb2Jr?=,

> I have made a form in VBA with 2 listboxes, lstSubrubriek and lstResult with
> 3 columns.

In which application environment and which version of that application?

You use the NZ function, but that's not a general VB function, I don't turn it
up in the Office Object model library. I can only remember seeing that in
Access...

> The selections the user made in lstSubrubriek I want to display in lstResult.
> I've done this in a listbox, because the user can order the list in lstResult.
[quoted text clipped - 24 lines]
>  
> End Sub

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
 
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.