2

I have a question about calling a Python script in my Excel VBA function. For instance, in my Excel VBA function, I have: abc(x,y,z). In this function, I will pass x,y,z to my Python script as input. Python output will then return calculation result to my abc() function. What I want to achieve is as follows:

    function abc(x,y,z)
    ' here x, y, z is the input that will pass to Python
    ' then we call python scripts here with the return value h
    < call Python here>
    abc=h
    end function 

My question is:

  1. How to pass x,y,z to Python scripts?
  2. How to give my return value h to abc()?
3
  • Possible duplicate of How do you pass a value from VBA to python Commented Nov 23, 2015 at 20:51
  • If you look to the right below the adds you will see similar questions with answers. I would encourage your to look at those Commented Nov 23, 2015 at 20:52
  • Possible duplicate of Return result from Python to Vba Commented Mar 12, 2019 at 1:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.