I encounter the following error within my Excel macro when I tried to execute it : Compilation Error : Function or Variable expected.
Here is my code :
'On split le libellé afin de récupérer la chaîne de caractère source1 à rechercher dans la colonne B du PSR
TabSrcDoubleEntree = Split(PtoutPar(j).Nom, "/")
' on récupère la ligne du PSR (colonne B) dans laquelle la chaîne source 1 (=TabSrcDoubleEntree(0)) est renseignée
Set sheet = Workbooks(PFile).Sheets(ParMap(j).Parametrage.SrcFeuille)
**With sheet.Activate**
Set celluleRowRange = .Range("B", .Range("B").End(xlUp))
Set celluleFind = celluleRowRange.Find(TabSrcDoubleEntree(0), LookIn:=xlValues, lookat:=xlWhole)
celluleRowFind = celluleFind.Row
End With
'on initialise la ligne à partir de laquelle on fait la recherche à "c.Row"
ThisWorkbook.Sheets(PFeuilleDest).Cells(iDest, ParMap(j).Parametrage.DestCol).Value = Workbooks(PFile).Sheets(ParMap(j).Parametrage.SrcFeuille).Cells(celluleFind.Row + ParMap(j).Parametrage.SrcPremiereLigne, ParMap(j).Parametrage.SrcCol).Value
=> Does anyone know why the instruction sheet.Activate is not correct ??
THanks a lot Simon