How to automatic filling of a column from a cell in excel while the cell take values automaticly from python file?

Viewed 36

I'm using excel to save values coming from Kepserverx or python program. When I write a value to a cell I want to make it transfered to anthor colomn for exemple. I have tried to make it work with VBA code, But the action change in VBA didn't read the value that comes from python, it reads only values typed manually to cell.

This is the VBA code:

Private Sub Worksheet_Change(ByVal Target As Range)
    Dim DEST As Range

    If Target.Address <> "$A$1" Then Exit Sub
    If Range("B1").Value = "" Then Set DEST = Range("B1") Else Set DEST = Cells(Application.Rows.Count, "B").End(xlUp).Offset(1, 0)
    DEST.Value = Range("A1").Value
    Application.SendKeys ("{ENTER}")
End Sub

Is there any solution to make it works ?

0 Answers
Related