I declared all the variables on my code, I can't understand why I have this type of errror :
My code is :
Option Explicit
Sub Code_Isin()
Application.Run "RefreshAllStaticData"
Dim xlCalc As XlCalculation
Dim ws As Object
Dim Num_Ligne As Long
Dim BloombergUI As Object
For Each ws In Worksheets
Num_Ligne = 2
xlCalc = Application.Calculation
Application.Calculation = xlCalculationAutomatic
While ws.Cells(Num_Ligne, 1) <> ""
ws.Cells(Num_Ligne, 2).Formula = "=BDP(""" & ws.Cells(Num_Ligne, 1).Value & "Equity"" , ""NAME"")"
BloombergUI.RefreshAllStaticData
Num_Ligne = Num_Ligne + 1
Wend
Do Until Application.CalculationState = xlDone
Loop
Next
End Sub