- Код: Выделить всё
Private Sub Del()
Dim i As Integer
For i = 5 To UBound(myArray) - 1
myArray(i) = myArray(i + 1)
Next i
ReDim Preserve myArray(UBound(myArray) - 1)
End Sub
Private Sub Del()
Dim i As Integer
For i = 5 To UBound(myArray) - 1
myArray(i) = myArray(i + 1)
Next i
ReDim Preserve myArray(UBound(myArray) - 1)
End Sub
Private Sub List1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
Dim Path As String
Dim tmp As String
Path = Data.Files(1)
If Path <> "" Then
tmp = UCase(Right(Path, 4))
If tmp = ".WMA" Or tmp = ".WAV" Or tmp = ".MP3" _
Then
List1.AddItem fName(Path), List1.ListCount
ReDim Preserve File(UBound(File) + 1)
File(List1.ListCount - 1) = Path
Else
If tmp = ".LAP" Then
'LoadList (Path)
Else
MsgBox "Неподдерживаемый формат файла", vbInformation
End If
End If
End If
End Sub
Private Sub delCount()
Dim i As Integer
List1.RemoveItem (List1.ListIndex)
For i = List1.ListIndex To UBound(File) - 1
File(i) = File(i + 1)
Next i
ReDim Preserve File(UBound(File) - 1)
End Sub
AntonGV писал(а):И так удаляю элементы массива
- Код: Выделить всё
Private Sub delCount()
Dim i As Integer
List1.RemoveItem (List1.ListIndex)
For i = List1.ListIndex To UBound(File) - 1
File(i) = File(i + 1)
Next i
ReDim Preserve File(UBound(File) - 1)
End Sub
Сейчас этот форум просматривают: SemrushBot и гости: 73