Results 1 to 7 of 7

Thread: can somebody tell me why (RESOLVED)

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2005
    Posts
    277

    Resolved can somebody tell me why (RESOLVED)

    can somebody try and explain why I can only add a maximum of 7 files at a time using this code

    thanks

    VB Code:
    1. Private Sub Command1_Click()
    2.  
    3.     Dim i As Integer
    4.  
    5.     ProgressBar1.min = 0
    6.     'ProgressBar1.Max = 100
    7.     ProgressBar1.Value = 0
    8.     ProgressBar1.Scrolling = ccScrollingSmooth
    9.  
    10.     Dim strFile() As String, strPath As String
    11.     Dim n As Long, nCount As Long
    12.     On Error Resume Next
    13.     With CommonDialog1
    14.         .Flags = cdlOFNAllowMultiselect + cdlOFNExplorer
    15.         .CancelError = True
    16.         .InitDir = "C:\"
    17.         .DialogTitle = "Select File To Add To Playlist"
    18.      
    19.         .ShowOpen
    20.         If Err.Number <> cdlCancel Then
    21.             strFile = Split(.FileName, vbNullChar)
    22.             nCount = UBound(strFile)
    23.             If nCount = 0 Then
    24.                 'Only one file is selected so split up the path and the filename
    25.                 ReDim strFile(1)
    26.                 strFile(0) = Left$(.FileName, InStrRev(.FileName, "\"))
    27.                 strFile(1) = Mid$(.FileName, InStrRev(.FileName, "\") + 1)
    28.                 nCount = 1
    29.             End If
    30.             strPath = strFile(0)
    31.             If Right$(strPath, 1) <> "\" Then
    32.                 strPath = strPath & "\"
    33.             End If
    34.             ProgressBar1.Max = nCount
    35.             For n = 1 To nCount
    36.                 If Len(Dir(FAVORITES_FOLDER & strFile(n))) = 0 Then
    37.                     FileCopy strPath & strFile(n), FAVORITES_FOLDER & strFile(n)
    38.                 End If
    39.                 ProgressBar1.Value = nCount
    40.             Next
    41.         End If
    42.     End With
    43. End Sub
    Last edited by robvr6; Feb 8th, 2005 at 12:34 AM. Reason: resolved

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