
Error 70 - PERMISO DENEGADO
Publicado por Jose (1 intervención) el 08/01/2021 04:28:46
Estoy intentando realizar un filtro a mi listbox y me aparece este error alguien me sabe el poque?
mi codigo
mi codigo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Private Sub txtdocumentoD_Change()
Dim Numero As Range
Dim Y As String
Dim Fila As Variant
Dim coincidencia As Boolean
Dim myList() As Variant
Y = 1
'replicamos un filtro a visualizar sobre el ListBox
For Fila = 7 To Sheets("Pagos y Abonos").Range("A" & Rows.Count).End(xlUp).Row
If InStr(1, UCase(Sheets("Pagos y Abonos").Range("A" & Fila).Value), UCase(txtdocumentoD.Value)) > 0 Then
coincidencia = True
ReDim Preserve myList(6, Y)
'cargamos nuestra matriz....
myList(0, Y) = Sheets("Notas de Entrega").Range("A" & Fila).Text
myList(1, Y) = Sheets("Notas de Entrega").Range("B" & Fila).Text
myList(2, Y) = Sheets("Notas de Entrega").Range("D" & Fila).Text
myList(3, Y) = Sheets("Notas de Entrega").Range("E" & Fila).Text
myList(4, Y) = Sheets("Notas de Entrega").Range("H" & Fila).Text
myList(5, Y) = Sheets("Notas de Entrega").Range("G" & Fila).Text
Y = Y + 1
End If
Next
'si hemos localizado alguna coincidencia...
If coincidencia = True Then
'mostramos datos coincidentes cargados en nuestra Array
Me.viewD.List = Application.Transpose(myList)
Else
Me.viewD.Clear
End If
End Sub
Valora esta pregunta


0