# Demo of a Visual BASIC Converter in CODA

**URL:** <https://connect.superhuman.com/t/demo-of-a-visual-basic-converter-in-coda/27136>\
**Category:** Developers Central\
**Created:** [November 30, 2021, 4:09pm UTC](https://connect.superhuman.com/t/demo-of-a-visual-basic-converter-in-coda/27136 "2021-11-30T16:09:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Max\_OBrien](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/max_obrien/32/49285_2.png) [@Max\_OBrien](https://connect.superhuman.com/u/Max_OBrien)\
**Post date:** [November 30, 2021, 4:09pm UTC](https://connect.superhuman.com/t/demo-of-a-visual-basic-converter-in-coda/27136/1 "2021-11-30T16:09:40Z")

</div>

a long time ago in a galaxy far far away (called the mid-1970’s)…

young hackers like me were playing with Zilog Z80 chips and 6502 CPUs  
(now its Adrinos & Raspberry PIs)

and the first program we would write was an interpreter for TINY BASIC

now, decades later, i wanted to do the same in CODA

not JUST for fun, but because many of my clients have TONS of macros and automations running in Excel using Visual BASIC (VBA)

so this little demo implements a tiny sub-set of the VBA language, converts it into Coda Formula Language and executes it on any set of Tables or Canvas Controls you have in your document.

its very crude at this point - only a few statement types are supported and there is NO syntax checking - if you have an error the code just fails to run

i plan to rectify all that over time AND use the same method to implement Javascript, Python & Clojure.

https://coda.io/embed/NpRasrlYqN/_suLuE?viewMode=embedplay&hideSections=true

respect  
max

---

<div class="post-metadata">

**Author:** ![Paul\_Danyliuk](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/paul_danyliuk/32/27228_2.png) [@Paul\_Danyliuk](https://connect.superhuman.com/u/Paul_Danyliuk)\
**Post date:** [November 30, 2021, 4:59pm UTC](https://connect.superhuman.com/t/demo-of-a-visual-basic-converter-in-coda/27136/2 "2021-11-30T16:59:00Z")

</div>

Holy hell 🤣  
Good job @Max_OBrien 😂

---

<div class="post-metadata">

**Author:** ![Max\_OBrien](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/max_obrien/32/49285_2.png) [@Max\_OBrien](https://connect.superhuman.com/u/Max_OBrien)\
**Post date:** [November 30, 2021, 5:08pm UTC](https://connect.superhuman.com/t/demo-of-a-visual-basic-converter-in-coda/27136/3 "2021-11-30T17:08:21Z")

</div>

thanks @Paul_Danyliuk,

its VERY crude, not even a proper lexical analyser

just a rough proof of concept or ‘spike’ as they say

but it runs, and it has lots of potential

AND its totally safe, it cant access anything nor do anything you cant do inside the doc with cfl anyways.

but

LOTS of work still to do

all fun and games

max

---

<div class="post-metadata">

**Author:** ![Eric\_Koleda](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/eric_koleda/32/50286_2.png) [@Eric\_Koleda](https://connect.superhuman.com/u/Eric_Koleda)\
**Post date:** [November 30, 2021, 5:51pm UTC](https://connect.superhuman.com/t/demo-of-a-visual-basic-converter-in-coda/27136/4 "2021-11-30T17:51:01Z")

</div>

Very impressive! Basic was my first programming language, so it will always hold a special place in my heart. Any support for the GOTO statement? 😆

---

<div class="post-metadata">

**Author:** ![Max\_OBrien](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/max_obrien/32/49285_2.png) [@Max\_OBrien](https://connect.superhuman.com/u/Max_OBrien)\
**Post date:** [November 30, 2021, 6:09pm UTC](https://connect.superhuman.com/t/demo-of-a-visual-basic-converter-in-coda/27136/5 "2021-11-30T18:09:31Z")

</div>

shock horror! @Eric_Koleda  
i have not coded a goto since 1980  
“considered harmful” was an understatement

for now i just map to existing coda features such as formulamap(), if(), switchif(), withname(), runactions(), and the regular data manipulation functions.

so when coda puts a goto() into cfl

THEN. and only then…

i will abandon coda and NEVER come back

😉

---

<div class="post-metadata">

**Author:** ![Paul\_Danyliuk](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/paul_danyliuk/32/27228_2.png) [@Paul\_Danyliuk](https://connect.superhuman.com/u/Paul_Danyliuk)\
**Post date:** [November 30, 2021, 6:24pm UTC](https://connect.superhuman.com/t/demo-of-a-visual-basic-converter-in-coda/27136/6 "2021-11-30T18:24:11Z")

</div>

> [@Eric\_Koleda](#):
>
> Any support for the GOTO statement? 😆

Man, why did you have to mention that?

I will lose my sleep now until I code a goto on Coda 😆
