# Running Julia scripts from excel VBA

**URL:** <https://discourse.julialang.org/t/running-julia-scripts-from-excel-vba/54022>\
**Category:** General Usage\
**Created:** [January 27, 2021, 12:57am UTC](https://discourse.julialang.org/t/running-julia-scripts-from-excel-vba/54022 "2021-01-27T00:57:02Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Peter-Jolly](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/peter-jolly/32/19371_2.png) [@Peter-Jolly](https://discourse.julialang.org/u/Peter-Jolly)\
**Post date:** [February 9, 2021, 10:24pm UTC](https://discourse.julialang.org/t/running-julia-scripts-from-excel-vba/54022/6 "2021-02-09T22:24:59Z")

</div>

Just to let everyone know the following VBA code worked for runnining a julia script from excel (VBA)

```julia
Sub Run_Julia()

Dim objShell As Object
Dim Julia_Script, Julia_Exe As String

Set objShell = VBA.CreateObject("WScript.Shell")

Julia_Exe = """C:\Users\peter\AppData\Local\Programs\Julia 1.5.3\bin\julia.exe"""
Julia_Script = "C:\Users\peter\Documents\Julia_Code\Greenhouse_Model\Green-Lights-main\test.jl"
objShell.Run Julia_Exe & Julia_Script
 
Set objShell = Nothing

End Sub

```

Case closed!

---

_[View the full topic](https://discourse.julialang.org/t/running-julia-scripts-from-excel-vba/54022)._
