Results 1 to 6 of 6

Thread: [Resolved]connect Progress Bar to function

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2007
    Posts
    36

    [Resolved]connect Progress Bar to function

    i finally after the help from friends here finished writing the code to my programe.....
    so now i want to add Progress Bar to my function that while the function process the files the Progress Bar count....
    here is part of code
    Code:
    Private Sub Command2_Click()
    
    Dim sAfter As String
    Dim sBefore As String
    Dim i As Long
      
     FirText = "  " & FirText & "  "
     FirText = Replace(FirText, vbCr, " " & vbCr) & " "
     FinText = Left(FirText, 1)
     For i = 2 To Len(FirText) - 1
    
    
    sAfter = Mid(FirText, i + 1, 1)
    sBefore = Mid(FirText, i - 1, 1)
    
     Select Case Mid(FirText, i, 1)
    
         Case "("
        FinText = FinText & "["
        
         Case ")"
        FinText = FinText & "]"
        
         Case "["
        FinText = FinText & "{"
        
         Case "]"
        FinText = FinText & "}"
        
         Case "{"
        FinText = FinText & "{"
        
         Case "}"
        FinText = FinText & "}"
        
         Case "-"
        FinText = FinText & "-"
        
         Case "+"
        FinText = FinText & "+"
        
         Case "="
        FinText = FinText & "="
        
         Case "0"
        FinText = FinText & "*"
        
         Case "%"
        FinText = FinText & "$"
        
        
       Case "Ç"
        Select Case sBefore
        Case "È", "Ê", "Ë", "Ì", "Í", "Î", "Ú", "ä", "å", "í"
            FinText = FinText & "D"    
       Case "á"
        FinText = FinText & ""
        Case Else
            FinText = FinText & "C" 
        End Select
    
      Case Else
        If Mid(FirText, i, 2) = vbNewLine Then
          FinText = FinText & vbNewLine
          i = i + 1
             End If
      
     End Select
     
    Next
    
    FinText = FinText & Right$(FirText, 1)
    FinText = Trim(FinText)
    
    End sub
    some letters not clear because this programe to deal with arabic language....
    now my question is how can i connect Progress Bar to this function which take text files and process them i try many times (some times the process finshed while the Progress Bar fill just 3 or 4 unit and times Progress Bar finshed count while the function not finshed process the text.......
    how i can do that in the corect way....
    i hope you understand the idea
    and sorry for my english
    Last edited by king4ever101; Jul 17th, 2007 at 02:22 PM.

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