• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 158
  • Last Modified:

Listview's item object...

Which of the following statements would modify the text for the second subitem of a listview's item object ?

1)Item.ListSubItems(2) = "Clicked"
2)Item.ListSubItems(1) = "Clicked"
3)Item.Sub(1) = "Clicked"
4)Item.SubItems(2) = "Clicked"


Thanks,
bhavesh
0
bhavesh55
Asked:
bhavesh55
1 Solution
 
mcriderCommented:
Stop asking test questions!

To everyone else... This guy graded my last CORRECT answer as a "D"... Don't let him bring your grade average down...
0
 
mcriderCommented:
bhavesh55's grade ratio:  14 / 28
0
 
nico5038Commented:
Listitems are starting at 0 so probably answer 2 or 3 will be the correct one. However, why not start the VB debugger and try it yourself ?
It's faster and is more rewarding when you find something yourself!

BTW mcrider to speak with a well known author:
"What's in a grade?" (or was it name?)

I'm in for the fun and for sharing knowledge, not for the points !
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
hessCommented:
Item.SubItems(2) = "Clicked"
it is that i think... but it might be
Item.SubItems(1) = "Clicked"
.... i'm not sure if the first item is zero
0
 
RuchiCommented:
The answer to your question is 4.

Hess: The first item for Subitem is 1.
For example,
Dim llist as ListItem
Set llist = lvwOrders.ListItems.Add(, , "Hess")
With llist
   .SubItems(1) = 1
   .SubItems(2) = 2
End With

There is a SubItem for each column in the LV, other than the first column.
0
 
bhavesh55Author Commented:
Ruchi
Thanks a lot.

May i have your personal e-mail address.

Thanks,
bhavesh
0
 
RuchiCommented:
Bhavesh: No problem. Post your e-mail address, and I will send you an e-mail. Accept my answer or reject it.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now