-
Jun 16th, 2021, 08:39 AM
#1
Thread Starter
New Member
Recorrer con For en ListView
Estimados Soy nuevo en la programación con el control listview, he actualizado mi listbox y tengo el siguiente problema
CODIGO QUE TENIA EN EL LISBOX
with Listbox1
For i = 0 To Me.ListBox1.ListCount - 1
If .ListCount = .ListIndex + 1 Then: Exit Sub
.ListIndex = .ListIndex + 1
Call PASAR_DATOS_CREDENCIAL
Call CREAR_CREDENCIAL
Next i
end with
CODIGO ACTUAL: EL CUAL ME DA ERROR DICE: "error 383 property is read-only"
With Me.LTV_REGISTRO
If Answer = vbYes Then
For i = 1 To Me.LTV_REGISTRO.ListItems.Count
If .ListItems.Count = .ListItems.Item(i).Index + 1 Then: Exit Sub
.ListItems.Item(i).Index = .ListItems.Item(i).Index + 1
Call PASAR_DATOS_CREDENCIAL
Call CREAR_CREDENCIAL_PDF
Next i
End If
End With
si alguien pudiera ayudarme con esto.. por favor
-
Jun 16th, 2021, 09:27 AM
#2
Re: Recorrer con For en ListView
Translation:
Dear I am new to programming with the listview control, I have updated my listbox and I have the following problem
CODE I HAD IN THE LISBOX
if someone could help me with this .. please
-
Jun 17th, 2021, 03:53 AM
#3
Re: Recorrer con For en ListView
even with the translation, this is pretty had to understand
on which line does the error occur?, what is the value of i and the value of .listitems.count
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|