Results 1 to 2 of 2

Thread: Data.GetFormat(1) - txt file returning false?

Threaded View

  1. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Data.GetFormat(1) - txt file returning false?

    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:
    1. Private Sub Picture1_OLEDragDrop(Data As DataObject, Effect As Long, _
    2.                                  Button As Integer, Shift As Integer, _
    3.                                  X As Single, Y As Single)
    4. Dim i%
    5.  
    6.     For i = 1 To Data.Files.Count 'indexing starts at 1
    7.         Debug.Print Data.Files(i)
    8.         Select Case LCase(Right(Data.Files(i), 3)) 'you may want to work with this line
    9.             Case "txt"
    10.                 '...
    11.             Case Else
    12.                 '...
    13.         End If
    14.     Next i
    15.  
    16. End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width