{"id":6049,"date":"2014-01-24T12:17:50","date_gmt":"2014-01-24T12:17:50","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/?p=6049"},"modified":"2014-01-24T12:17:50","modified_gmt":"2014-01-24T12:17:50","slug":"macro-did-not-run-for-unknown-reasons-error-code-2147747072","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/24\/macro-did-not-run-for-unknown-reasons-error-code-2147747072\/","title":{"rendered":"Macro did not run for unknown reasons Error code 2147747072"},"content":{"rendered":"<p>In our last blog on Accpac Macro, we discussed about <a href=\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/14\/provide-file-menu-to-vba-forms\/\" target=\"_blank\">Provide File Menu to VBA Forms<\/a>.<br \/>\nIn this blog we will discuss about a general error that we face while running a macro from Sage 300 desktop as shown in the below screen shot.<br \/>\n<span style=\"color: #800000\"><em><strong>The New Stuff :<\/strong><\/em><\/span> <a title=\"Top Line Margin in Sage 300 ERP\" href=\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/24\/top-line-margin-in-sage-300-erp\/\" target=\"_blank\">Top Line Margin in Sage 300 ERP<\/a><\/p>\n<p style=\"text-align: center\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-content\/uploads\/2014\/01\/error.jpg\" target=\"_blank\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-6050\" alt=\"error\" src=\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-content\/uploads\/2014\/01\/error.jpg\" width=\"475\" height=\"171\" \/><\/a><\/p>\n<p>There are scenarios, where we develop macro and test it on the developer machine in the edit mode, where we do not face the above issue and the macro runs fine. But as we deploy the macro on the Sage 300 desktop, we encounter a situation wherein, the macro fails to open and the above message is displayed.<br \/>\n<strong>Instruction to be noted:<\/strong><br \/>\nWhen the macro is executed from the Sage 300 desktop, it expects the module <strong>\u201cMainModule\u201d<\/strong> to be present in the macro, along with the subroutine \u201c<strong>MainSub()\u201d<\/strong> which acts as the starting point for macro execution.<br \/>\nYou need to ensure that these instructions are followed in order to execute the macro from Sage 300 desktop.<\/p>\n<p style=\"text-align: left\"><strong>Also Read :<\/strong><br \/>\n1. <a title=\"VBA Macro Errors related to EXD Files\" href=\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2013\/01\/09\/vba-macro-errors-related-to-exd-files\/\" target=\"_blank\">VBA Macro Errors related to EXD Files<\/a><br \/>\n2. <a title=\"Macros in Sage 300 ERP\" href=\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2013\/08\/23\/macros-in-sage-300-erp\/\" target=\"_blank\">Macros in Sage 300 ERP<\/a><br \/>\n3. <a title=\"How To Add A Macro To Accpac Desktop of Sage 300 ERP\" href=\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2013\/11\/20\/how-to-add-a-macro-to-accpac-desktop-of-sage-300-erp\/\" target=\"_blank\">How To Add A Macro To Accpac Desktop of Sage 300 ERP<\/a><br \/>\n4. <a title=\"Run VBA Macro without Logging to Sage 300 ERP\" href=\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2013\/05\/15\/run-vba-macro-without-logging-to-sage-300-erp\/\" target=\"_blank\">Run VBA Macro without Logging to Sage 300 ERP<\/a><br \/>\n5. <a title=\"Define Budget Using Macro\" href=\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2013\/11\/14\/define-budget-using-macro\/\" target=\"_blank\">Define Budget Using Macro<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our last blog on Accpac Macro, we discussed about Provide File Menu to VBA Forms. In this blog we will discuss about a general error that we face while running a macro from Sage 300 desktop as shown in the below screen shot. The New Stuff : Top Line Margin in Sage 300 ERP\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/24\/macro-did-not-run-for-unknown-reasons-error-code-2147747072\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,2],"tags":[897,1511,2357,2979],"class_list":["post-6049","post","type-post","status-publish","format-standard","hentry","category-accpac-sdk","category-sage-accpac","tag-error-code-2147747072","tag-macro-did-not-run-for-unknown-reasons","tag-sage-300-erp","tag-vba-macro"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Macro did not run for unknown reasons Error code 2147747072 - Sage 300 ERP \u2013 Tips, Tricks and Components<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/24\/macro-did-not-run-for-unknown-reasons-error-code-2147747072\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Macro did not run for unknown reasons Error code 2147747072 - Sage 300 ERP \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"og:description\" content=\"In our last blog on Accpac Macro, we discussed about Provide File Menu to VBA Forms. In this blog we will discuss about a general error that we face while running a macro from Sage 300 desktop as shown in the below screen shot. The New Stuff : Top Line Margin in Sage 300 ERP\u2026 Read More &raquo;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/24\/macro-did-not-run-for-unknown-reasons-error-code-2147747072\/\" \/>\n<meta property=\"og:site_name\" content=\"Sage 300 ERP \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"article:published_time\" content=\"2014-01-24T12:17:50+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-content\/uploads\/2014\/01\/error.jpg\" \/>\n<meta name=\"author\" content=\"sage300\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"sage300\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/24\/macro-did-not-run-for-unknown-reasons-error-code-2147747072\/\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/24\/macro-did-not-run-for-unknown-reasons-error-code-2147747072\/\",\"name\":\"Macro did not run for unknown reasons Error code 2147747072 - Sage 300 ERP \u2013 Tips, Tricks and Components\",\"isPartOf\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/24\/macro-did-not-run-for-unknown-reasons-error-code-2147747072\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/24\/macro-did-not-run-for-unknown-reasons-error-code-2147747072\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-content\/uploads\/2014\/01\/error.jpg\",\"datePublished\":\"2014-01-24T12:17:50+00:00\",\"author\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#\/schema\/person\/1aced4e22c30ccf606960de27c9542f5\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/24\/macro-did-not-run-for-unknown-reasons-error-code-2147747072\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/24\/macro-did-not-run-for-unknown-reasons-error-code-2147747072\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/24\/macro-did-not-run-for-unknown-reasons-error-code-2147747072\/#primaryimage\",\"url\":\"http:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-content\/uploads\/2014\/01\/error.jpg\",\"contentUrl\":\"http:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-content\/uploads\/2014\/01\/error.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/24\/macro-did-not-run-for-unknown-reasons-error-code-2147747072\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Macro did not run for unknown reasons Error code 2147747072\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#website\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/\",\"name\":\"Sage 300 ERP \u2013 Tips, Tricks and Components\",\"description\":\"Explore the world of Sage 300 with our insightful blogs, expert tips, and the latest updates. We\u2019ll empower you to leverage Sage 300 to its fullest potential. As your one-stop partner, Greytrix delivers exceptional solutions and integrations for Sage 300. Our blogs extend our support to businesses, covering the latest insights and trends. Dive in and transform your Sage 300 experience with us! \",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#\/schema\/person\/1aced4e22c30ccf606960de27c9542f5\",\"name\":\"sage300\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g\",\"caption\":\"sage300\"},\"url\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/author\/sageaccpac\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Macro did not run for unknown reasons Error code 2147747072 - Sage 300 ERP \u2013 Tips, Tricks and Components","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/24\/macro-did-not-run-for-unknown-reasons-error-code-2147747072\/","og_locale":"en_US","og_type":"article","og_title":"Macro did not run for unknown reasons Error code 2147747072 - Sage 300 ERP \u2013 Tips, Tricks and Components","og_description":"In our last blog on Accpac Macro, we discussed about Provide File Menu to VBA Forms. In this blog we will discuss about a general error that we face while running a macro from Sage 300 desktop as shown in the below screen shot. The New Stuff : Top Line Margin in Sage 300 ERP\u2026 Read More &raquo;","og_url":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/24\/macro-did-not-run-for-unknown-reasons-error-code-2147747072\/","og_site_name":"Sage 300 ERP \u2013 Tips, Tricks and Components","article_published_time":"2014-01-24T12:17:50+00:00","og_image":[{"url":"http:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-content\/uploads\/2014\/01\/error.jpg","type":"","width":"","height":""}],"author":"sage300","twitter_card":"summary_large_image","twitter_misc":{"Written by":"sage300","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/24\/macro-did-not-run-for-unknown-reasons-error-code-2147747072\/","url":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/24\/macro-did-not-run-for-unknown-reasons-error-code-2147747072\/","name":"Macro did not run for unknown reasons Error code 2147747072 - Sage 300 ERP \u2013 Tips, Tricks and Components","isPartOf":{"@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/24\/macro-did-not-run-for-unknown-reasons-error-code-2147747072\/#primaryimage"},"image":{"@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/24\/macro-did-not-run-for-unknown-reasons-error-code-2147747072\/#primaryimage"},"thumbnailUrl":"http:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-content\/uploads\/2014\/01\/error.jpg","datePublished":"2014-01-24T12:17:50+00:00","author":{"@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#\/schema\/person\/1aced4e22c30ccf606960de27c9542f5"},"breadcrumb":{"@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/24\/macro-did-not-run-for-unknown-reasons-error-code-2147747072\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/24\/macro-did-not-run-for-unknown-reasons-error-code-2147747072\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/24\/macro-did-not-run-for-unknown-reasons-error-code-2147747072\/#primaryimage","url":"http:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-content\/uploads\/2014\/01\/error.jpg","contentUrl":"http:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-content\/uploads\/2014\/01\/error.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2014\/01\/24\/macro-did-not-run-for-unknown-reasons-error-code-2147747072\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/"},{"@type":"ListItem","position":2,"name":"Macro did not run for unknown reasons Error code 2147747072"}]},{"@type":"WebSite","@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#website","url":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/","name":"Sage 300 ERP \u2013 Tips, Tricks and Components","description":"Explore the world of Sage 300 with our insightful blogs, expert tips, and the latest updates. We\u2019ll empower you to leverage Sage 300 to its fullest potential. As your one-stop partner, Greytrix delivers exceptional solutions and integrations for Sage 300. Our blogs extend our support to businesses, covering the latest insights and trends. Dive in and transform your Sage 300 experience with us! ","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#\/schema\/person\/1aced4e22c30ccf606960de27c9542f5","name":"sage300","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g","caption":"sage300"},"url":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/author\/sageaccpac\/"}]}},"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/posts\/6049","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/comments?post=6049"}],"version-history":[{"count":0,"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/posts\/6049\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/media?parent=6049"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/categories?post=6049"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/tags?post=6049"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}