es(iIndex))
    If (lLen &gt; 32) Then
        For iPos = lLen To 1 Step -1
            If (Mid$(m_sFiles(iIndex), iPos, 1) = "\") Then
                If (lLen - iPos) &gt; 32 Then
                    If (iLastPos = 0) Then
                        sOut = "..." &amp; Mid$(m_sFiles(iIndex), iPos)
                    Else
                        sOut = "..." &amp; Mid$(m_sFiles(iIndex), iLastPos)
                    End If
                Else
                    iLastPos = iPos
                End If
       