I have my main sub named DXF()
that is called by a button in my excel sheet. DXF()
calls another sub named reorganisation(FirstLine, LastLine)
. Now I want reorganisation
to call another sub named sens(LastLine)
.
I did it like this in reorganisation(FirstLine, LastLine)
:
Sub reorganisation(FirstLine, LastLine)
[...]
Dim iLine As Integer, Ligne As Integer
With ActiveSheet
Set Temp = Range(.Cells(1000, 1000), .Cells(1000, 1013))
For iLine = FirstLine To LastLine
[...]
Ligne = iLine + 1
Do While Ligne <= LastLine ''' Organisation par des segments suivant le point de base
[...]
Loop
sens iLine '''' The error is here
Next iLine
End With
End Sub
Everything works well in this sub except where I call sens
.
Here is the sub sens
.
Sub sens(LastLine)
Dim iLine, Ligne As Integer
With ActiveSheet
For iLine = 3 To LastLine
[...]
Next iLine
End With
End Sub
So this gives me the error "Compilation error : sub, function or property needed". I really don't know why it makes this because there is no variable type problem, everything is integer so... If anyone can tell where the problem comes from thanks in advance !