Forum Discussion

franz_punz's avatar
franz_punz
Copper Contributor
Dec 01, 2024
Solved

VBA-->Script converter

Hi all, I've many excel files containing macros, these files are shared in the cloud and macro are not "allowed". Is there a way to convert VBA in to Script? thanks in advance

  • Unfortunately, there is no way to convert VBA macros to Office Scripts automatically. You'll have to rewrite your macros in Office Scripts.

3 Replies

  • May consider to rewrite:

     

    VBA Code:

    Sub HelloWorld() MsgBox "Hello, World!" End Sub

     

    Office Script:

    function main(workbook: ExcelScript.Workbook) { workbook.getApplication().showAlert("Hello, World!"); }

     

  • peiyezhu's avatar
    peiyezhu
    Bronze Contributor

    What kind of script?

    Office javascript ?

    Have you tried AI?

    Alternatively scripts like PHP ASP Python.

  • Unfortunately, there is no way to convert VBA macros to Office Scripts automatically. You'll have to rewrite your macros in Office Scripts.

Resources