[Python] vba_vs_python_time

Discussão em 'Python' iniciado por Stack, Fevereiro 15, 2025.

  1. Stack

    Stack Membro Participativo

    i want to ask why when i run a script python manually is mor fast that i run it using vba function excel

    Sub RunPythonScript()

    Dim objShell As Object
    Dim PythonExe, PythonScript As String

    'Create a shell object
    Set objShell = VBA.CreateObject("Wscript.shell")

    PythonExe = """C:\Users\user\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.8\Python """
    PythonScript = """C:\Users\user\.spyder-py3\temp.py"""

    objShell.Run PythonExe & PythonScript

    End Sub

    Continue reading...

Compartilhe esta Página