Results 1 to 4 of 4

Thread: bad file name error #52

Threaded View

  1. #1

    Thread Starter
    PowerPoster isnoend07's Avatar
    Join Date
    Feb 2007
    Posts
    3,237

    Resolved bad file name error #52

    This function gathers all the drive letters on a USB drive. It is reporting a bad File Name at Line 90 anyone know why ?

    Code:
    Function BackUpBidFoldersDrive() As String
                Dim UsbDriverLetters() As String
                Dim DriveLetterToUse As String
                Dim counter As Integer
                Dim i As Integer
                Dim UsbDriveLetter As String
                Dim TmpDriveLetter As String
                Dim CdFlashDriveLetter As String
                Dim freespace As Double 'Long
                Dim MostSpace As Double
    30            On Error GoTo e
          
    40           counter = 0
    
    50            For i = 65 To 90
    60              If DriveType(Chr$(i)) = "removeable" Then
    70                    If Chr$(i) <> "A" Then 'A shows as removal also
                              counter = counter + 1
    80                        TmpDriveLetter = Chr$(i)
    90                           ReDim Preserve UsbDriverLetters(counter + 1) 'error here
                                 UsbDriverLetters(counter) = Chr$(i) & ":\"
                           
                       End If
                   End If
                Next i
    Last edited by isnoend07; Apr 30th, 2010 at 11:45 AM. Reason: unmarked resolved
    Waiting for a full featured smart phone with out marrying a provider
    Go Android
    Go raiders

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