FIND in listview and put value in subitem

User avatar
sal21
PlatinumLounger
Posts: 4437
Joined: 26 Apr 2010, 17:36

FIND in listview and put value in subitem

Post by sal21 »

Code: Select all


TAVOLO = "TAVOLO-01"
        DATAT = "28/03/2022"
        ORAT = "08:00"

i have this variable (As string)

and the listview attached,

how to put X, into the related subitem?

in my case in the subitem with a red square in image
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78957
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: FIND in listview and put value in subitem

Post by HansV »

Loop through the items.
When you find the TAVOLO, inspect the first subitem (DATA).
If it equals DATAT, loop through the rest of the subitems until you find ORAT, then set the X and exit both loops.
Otherwise, continue.
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4437
Joined: 26 Apr 2010, 17:36

Re: FIND in listview and put value in subitem

Post by sal21 »

HansV wrote:
30 Mar 2022, 19:21
Loop through the items.
When you find the TAVOLO, inspect the first subitem (DATA).
If it equals DATAT, loop through the rest of the subitems until you find ORAT, then set the X and exit both loops.
Otherwise, continue.
Ok!