hello i need some macro to run my old macro from first to last cell in column A if in column B is empty and finish when in column A will be empty cell.

Sub Worksheet_Change()
Dim TheFuncKaina As Object
Dim priceValue As Object
Dim price As String

SAPLogin

Set TheFuncKaina = functionCtrl.Add("BAPI_MATERIAL_GET_DETAIL")
          
    TheFuncKaina.exports("MATERIAL") = range("A1").value
    TheFuncKaina.exports("VALUATIONAREA") = "B022"
    TheFuncKaina.exports("PLANT") = "B022"
        
If TheFuncKaina.Call Then
          
    Set priceValue = TheFuncKaina.imports("MATERIALVALUATIONDATA")
    price = priceValue.Value("STD_PRICE")
    Range("B1").Select
    ActiveCell.FormulaR1C1 = price
           
Else
        
    Range("B1").Select
    ActiveCell.FormulaR1C1 = "0"
                   
End If

End Sub
my macro exporting cell value in database and taking from database price for this value