1

I need to maintain a few scripts written in Visual Basic for Applications (VBA) alongside a project written in Python and I'd like to keep the VBA scripts under version control (git) with the other files.

So far I've only be able to save the scripts as part of a PowerPoint presentation and then only within Windows.

How can I execute a VBA script that's held in a plain-text file?

scanny
  • 26,423
  • 5
  • 54
  • 80
  • but why would you wanna hold the script in a plain txt file? If your working environment is windows wouldnt it be easier to store it as an executable *.vbs? If you still decide to actually store in a text file - then all it takes its to open the txt file, then copy its context and paste it in as a string to execute. –  Jun 03 '13 at 07:00
  • The library I'm working on is in Python and I'm developing it on OS X. The VBA scripts are for testing and for enumeration value discovery, things like that, and I run them on Windows in a virtual machine. I was hoping there was a way I could just run something from the Windows command line that would run the script, rather than having to cut and paste manually every time, especially remembering to paste back after making changes. – scanny Jun 03 '13 at 08:00
  • if youre in CMD and want to run a VBSscript file then just specify the part to the file and hit (or send keys) Enter –  Jun 03 '13 at 11:42
  • possible duplicate of [Version control Access 2007 database and application](http://stackoverflow.com/questions/1084811/version-control-access-2007-database-and-application) – RubberDuck Mar 01 '15 at 12:00

0 Answers0