{"componentChunkName":"component---src-templates-post-template-js","path":"/2016/11/14/vba-ide-export/","result":{"data":{"mdx":{"frontmatter":{"title":"VBA Code Export for Version Control Systems","date":"2016 November 14th"},"body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"date\": \"2016-11-14T00:00:00.000Z\",\n  \"title\": \"VBA Code Export for Version Control Systems\",\n  \"tags\": [\"information\", \"vcs\", \"vba\"],\n  \"published\": true\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"I have seen the same situation many times now in my career as a VBA\\nDeveloper about how source code control is managed with VBA projects.\"), mdx(\"p\", null, \"Source control on VBA has long been a bit of a nonsense, there isn\\u2019t\\nany really. When I started my first developer role it was talked about\\nin my team why we don\\u2019t use it and the best efforts the team did at\\nthe time was save the new version to a different folder location and\\nto compare changes in the code from a previous version meant getting a\\ntext compare app copy pasting the code into it from the two different\\nversions so you could track what was changed.\"), mdx(\"p\", null, \"My colleague at the time and now very good friend\\n\", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://uk.linkedin.com/in/paul-crook-4065a461\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"Paul Crook\"), \" came up\\nwith the base of what I have done with the\\n\", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://github.com/spences10/VBA-IDE-Code-Export\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"VBA IDE Code Export tool\"), \"\\nI have just extended some parts of his base that I feel were needed.\"), mdx(\"p\", null, \"What was lacking from Crookie\\u2019s code, which I brought up at the time\\nwith him was that it only exported \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"*.bas\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"*.cls\"), \" and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"*.frm\"), \" files\\nI did ask about code contained within the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"ThisWorkbook\"), \" and the\\n\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Sheet*\"), \" modules. What we decided to do was if there was code in those\\nmodules was to abstract it out into its own module, so \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"ThisWorkbook\"), \"\\nwould call out to \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"ThisWorkbook.bas\"), \" this was a bit of extra work to\\nbegin with but ultimately benefited us in the long run with good\\nversion control.\"), mdx(\"p\", null, \"I wasn\\u2019t keen on how you had to work with this so decided to have a\\nplay around with it when I put it on\\n\", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://github.com/spences10/VBA-IDE-Code-Export\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"GitHub\"), \" I decided\\nto try right some of that, I think I may have made some things worse\\nbut I\\u2019m keen to make another revision of the tool in the future to\\ncorrect that.\"), mdx(\"h3\", {\n    \"id\": \"what-did-you-make-better\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#what-did-you-make-better\",\n    \"aria-label\": \"what did you make better permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"what did you make better\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"added functionality to save code from \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"ThisWorkbook\"), \" and \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"Sheet*\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"made a \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \".conf\"), \" file to save the project contents to meaning there\\nwere no modules left in the project after export\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"added the ability to specify an import and export location, it was\\ndefaulted to the root of where the source workbook was located\")), mdx(\"h3\", {\n    \"id\": \"what-did-you-mess-up\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#what-did-you-mess-up\",\n    \"aria-label\": \"what did you mess up permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"what did you mess up\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"added a form, means more validation\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"added ranges to the configuration worksheet for storing locations\\nother than the \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"ThisWorkbook\"), \" file location\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"didn\\u2019t add the new functionality to the existing code\")), mdx(\"h3\", {\n    \"id\": \"up-next\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#up-next\",\n    \"aria-label\": \"up next permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"up next\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"possibly remove the old method that copied out the project contents\\nto a module and go full retard with the \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \".conf\"), \" file\")));\n}\n;\nMDXContent.isMDXComponent = true;","excerpt":"I have seen the same situation many times now in my career as a VBA\nDeveloper about how source code control is managed with VBA projects…","tableOfContents":{"items":[{"url":"#what-did-you-make-better","title":"what did you make better"},{"url":"#what-did-you-mess-up","title":"what did you mess up"},{"url":"#up-next","title":"up next"}]},"timeToRead":2,"fields":{"slug":"/2016/11/14/vba-ide-export/","editLink":"https://github.com/spences10/thelocalhost/edit/authoring/posts/2016/11/14/vba-ide-export/index.md"}}},"pageContext":{"slug":"/2016/11/14/vba-ide-export/","previous":{"id":"35996713-af19-538d-baa0-dd884054b3ae","excerpt":"Ok, I have recently discovered and started doing freeCodeCamp(🔥)\nwhich so far I'm really enjoying. Since being out of work I have had some time to start exploring\ndifferent programming languages and technologies but I haven't found\nany courses that…","frontmatter":{"title":"freeCodeCamp","date":"2016-11-13T00:00:00.000Z"},"fields":{"slug":"/2016/11/13/freecodecamp/"}},"next":{"id":"d8a8d790-9337-53ef-a9b5-ddd59c47f1ef","excerpt":"I'm a published developer!  sort of  Well that was a bit painful, well\nnot actually I mean from the documentation I feel I was a bit mislead. So for those of you that know what I do for a living I'm primarily an\nAnalyst Developer with a skill set of…","frontmatter":{"title":"My first Microsoft Visual Studio Code [VSCode] extension","date":"2016-12-03T00:00:00.000Z"},"fields":{"slug":"/2016/12/03/first-vscode-extension/"}}}}}