You could've as well explain what you're trying to do...![]()
Since it looks like OleDragDrop here's what you can do (some extra validations may required):
VB Code:
Private Sub Picture1_OLEDragDrop(Data As DataObject, Effect As Long, _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) Dim i% For i = 1 To Data.Files.Count 'indexing starts at 1 Debug.Print Data.Files(i) Select Case LCase(Right(Data.Files(i), 3)) 'you may want to work with this line Case "txt" '... Case Else '... End If Next i End Sub




Reply With Quote