Running Macros without opening excel

前端 未结 5 1259
礼貌的吻别
礼貌的吻别 2020-12-17 07:05

I wonder how would you assign VBA codes written on Excel VBA to a sort of procedure/programme or maybe dos related filepath, which you can directly without opening excel. In

5条回答
  •  庸人自扰
    2020-12-17 07:42

    If the VBA in the Excel macro doesn't reference Excel objects, you can just copy the code into a text file and change the extension to .VBS. However, VB script doesn't like it when you use types, just delete the "AS something" from your Dim statement.

    I do this often to get the benefit of Intellisense, which I wouldn't have using Notepad.

    If my assumption is correct, then you probably want to change your tags to VB Scripting instead of Excel to get appropriate help.

提交回复
热议问题