Skip to content

Instantly share code, notes, and snippets.

@pescara
pescara / ExportVisualBasicCode.bas.vb
Last active February 11, 2019 07:57 — forked from steve-jansen/ExportVisualBasicCode.bas.vb
Excel macro to export all VBA source code in this project to text files for proper source control versioning.
' Excel macro to export all VBA source code in this project to text files for proper source control versioning
' Requires enabling the Excel setting in Options/Trust Center/Trust Center Settings/Macro Settings/Trust access to the VBA project object model
' Im VBA muss Extras/Verweise/Microsoft Scripting Runtime aktiviert sein
Public Sub ExportVisualBasicCode()
Const Module = 1
Const ClassModule = 2
Const Form = 3
Const Document = 100
Const Padding = 24