Afficher un message
Vieux 08/11/2006, 15h17   #7 (permalink)
the_ionic
XLDnaute Nouveau
 
Date d'inscription: novembre 2006
Messages: 17
Par défaut Re : Parcours itératif de cellule

Bon, j'ai trouvé. Voici la solution pour qui rencontrerait le même problème.

Code:
Sub ChargerFichiers()
Dim c As Range
Dim Chemin$
Dim i As Integer
Dim colonne As Byte
Dim lignedebut As Integer, lignedefin As Integer
Dim workBookName As String


workBookName = ThisWorkbook.Name
Chemin = ThisWorkbook.Path

Application.Calculation = xlCalculationManual
Set c = Cells.Find(".xls")
If Not c Is Nothing Then
    colonne = c.Column
    lignedebut = c.Row
    lignedefin = Cells(65536, colonne).End(xlUp).Row
    For i = lignedebut To lignedefin
         Workbooks.Open Chemin & "\" & Cells(i, colonne)
         Workbooks(workBookName).Activate
    Next i
End If
Application.Calculation = xlCalculationAutomatic
End Sub
qui fait bien le recalcul qu'une fois tous les fichiers ouverts.
the_ionic est déconnecté   Réponse avec citation