Rnu-Time Error: 380 - Invalid property value

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jul 2007
Posts: 113
Reputation: tgifgemini is an unknown quantity at this point 
Solved Threads: 0
tgifgemini tgifgemini is offline Offline
Junior Poster

Rnu-Time Error: 380 - Invalid property value

 
0
  #1
Jul 26th, 2007
Good morning everybody:
I am attempting to populate a listview control on Form Load()
and I get a Run-Time Error: 380 - Invalid property value. Below is the line to generates the error:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. lvw.ListItems(lvw.ListItems.Count).SubItems(1) = OutlookAddressEntry.Address

Below is alos my entire FormLoad module:

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Private Sub Form_Load()
  2. Set OutlookApp = New Outlook.Application
  3. Set OutlookMailItem = OutlookApp.CreateItem(olMailItem)
  4. Set OutlookNameSpace = OutlookApp.GetNamespace("MAPI")
  5.  
  6. lvw.ListItems.Clear
  7.  
  8. For Each OutlookAddressList In OutlookNameSpace.AddressLists
  9. For Each OutlookAddressEntry In OutlookAddressList.AddressEntries
  10. lvw.ListItems.Add , , OutlookAddressEntry.Name
  11. lvw.ListItems(lvw.ListItems.Count).SubItems(1) = OutlookAddressEntry.Address
  12. lvw.ListItems(lvw.ListItems.Count).SubItems(2) = OutlookAddressEntry.ID
  13. lvw.ListItems(lvw.ListItems.Count).Tag = OutlookAddressEntry.ID
  14. Next
  15. Next
  16. End Sub

Any help will b greatly appreciated
Thanks,
tgifgemini.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 192
Reputation: plusplus is an unknown quantity at this point 
Solved Threads: 16
plusplus plusplus is offline Offline
Junior Poster

Re: Rnu-Time Error: 380 - Invalid property value

 
0
  #2
Jul 26th, 2007
try
.count -1
when there are 3 entries ,count would be 3, but the last index is 2 since it starts at 0
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 113
Reputation: tgifgemini is an unknown quantity at this point 
Solved Threads: 0
tgifgemini tgifgemini is offline Offline
Junior Poster

Re: Rnu-Time Error: 380 - Invalid property value

 
0
  #3
Jul 26th, 2007
I changed my codes to:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. lvw.ListItems.Add , , OutlookAddressEntry.Name
  2. lvw.ListItems(lvw.ListItems.Count).SubItems(1) = OutlookAddressEntry.Address
  3. lvw.ListItems(lvw.ListItems.Count).SubItems(2) = OutlookAddressEntry.ID
  4. lvw.ListItems(lvw.ListItems.Count).Tag = OutlookAddressEntry.ID

But I still get compile error: 380 - Invalid property value.
sorry for the inconveniences.
tgifgemini.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 113
Reputation: tgifgemini is an unknown quantity at this point 
Solved Threads: 0
tgifgemini tgifgemini is offline Offline
Junior Poster

Re: Rnu-Time Error: 380 - Invalid property value

 
0
  #4
Jul 26th, 2007
Sorry my mistake. I changed my codes to:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. lvw.ListItems.Add , , OutlookAddressEntry.Name
  2. lvw.ListItems(lvw.ListItems.Coun-1t).SubItems(1) = OutlookAddressEntry.Address
  3. lvw.ListItems(lvw.ListItems.Count-1).SubItems(2) = OutlookAddressEntry.ID
  4. lvw.ListItems(lvw.ListItems.Count-1).Tag = OutlookAddressEntry.ID

But I got the same compile error: 380-invalid property value.
tgifgmini.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 113
Reputation: tgifgemini is an unknown quantity at this point 
Solved Threads: 0
tgifgemini tgifgemini is offline Offline
Junior Poster

Re: Ruu-Time Error: 35600 - index out of bounds

 
0
  #5
Jul 26th, 2007
Now I got the above title error on the code below:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. lvw.ListItems(lvw.ListItems.Count - 1).SubItems(1) = OutlookAddressEntry.Address

Thanks
tgifgemini.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC