{"id":578,"date":"2024-09-25T07:05:09","date_gmt":"2024-09-25T06:05:09","guid":{"rendered":"https:\/\/moodytech.uk\/kb\/?post_type=knowledgebase&#038;p=578"},"modified":"2024-09-25T07:17:20","modified_gmt":"2024-09-25T06:17:20","slug":"moody-project-report-vba","status":"publish","type":"knowledgebase","link":"https:\/\/moodytech.uk\/kb\/index\/excel\/moody-project-report-vba\/","title":{"rendered":"Moody Project Report (VBA)"},"content":{"rendered":"<!--CONTENT HERE-->\r\nVisual Basic for Applications script to merge multiple .xlsx files generated from D365 > Project Management and Accounting > Enquiries and Reports > Moody Project Report\r\n<br><br>\r\nIn Excel, use Alt + F11 to invoke the Visual Basic for Applications tool, and use Alt + F8 to run the script.\r\n<br><br>\r\nThe script is made up of three parts:<br>\r\n\t<li>part 1 imports the multiple Excel files into separate worksheets in a single Excel file,<\/li>\r\n        <li>part 2 renames each sheet based on the list of names found in the &#8216;List&#8217; worksheet and subsequently moves the &#8216;Summary&#8217; sheet from last to first position in the Workbook,<\/li>\r\n        <li>and part 3 deletes the &#8216;List&#8217; sheet<\/li>\r\n<br>\r\nThe file can then be Saved As an ordinary XLSX file.\r\n<br><br>\r\nPART 1 &#8211; MERGE FILES<br>\r\n<strong><a href=\"https:\/\/moodytech.uk\/kb\/wp-content\/uploads\/2024\/09\/VBA_MergeFiles.txt\" rel=\"noopener\" target=\"_blank\">VBA_MergeFiles<\/a><\/strong>\r\n<br><br>\r\nPART 2 &#8211; RENAME SHEETS<br>\r\n<strong><a href=\"https:\/\/moodytech.uk\/kb\/wp-content\/uploads\/2024\/09\/VBA_RenameSheets.txt\" rel=\"noopener\" target=\"_blank\">VBA_RenameSheets<\/a><\/strong>\r\n<br><br>\r\nPART 3 &#8211; DELETE LIST SHEET<br>\r\n<strong><a href=\"https:\/\/moodytech.uk\/kb\/wp-content\/uploads\/2024\/09\/VBA_DeleteListSheet.txt\" rel=\"noopener\" target=\"_blank\">VBA_DeleteListSheet<\/a><\/strong>\r\n<br><br>\r\nCOMBINED VBA SCRIPT<br>\r\n<strong><a href=\"https:\/\/moodytech.uk\/kb\/wp-content\/uploads\/2024\/09\/VBA_CombinedScripts.txt\" rel=\"noopener\" target=\"_blank\">VBA_CombinedScripts<\/a><\/strong>\r\n<br><br>\r\nDOWNLOAD XLSM FILE<br>\r\n<strong><a href=\"https:\/\/www.moodydirect.com\/resources\/Master.xlsm\" rel=\"noopener\" target=\"_blank\">https:\/\/www.moodydirect.com\/resources\/Master.xlsm<\/a><\/strong>\r\n\r\n<hr \/>\r\n<div class=\"noPrint align wp-block-ppb-print-page\" id='ppbPrintPage-1' data-attributes='{&quot;cId&quot;:&quot;fef71a47-5&quot;,&quot;alignment&quot;:&quot;left&quot;,&quot;isPrintSection&quot;:true,&quot;sectionSelector&quot;:&quot;.bpress-content-area&quot;,&quot;icon&quot;:{&quot;type&quot;:&quot;default&quot;,&quot;default&quot;:&quot;fiPrinter&quot;,&quot;url&quot;:&quot;&quot;},&quot;btnTypo&quot;:{&quot;fontSize&quot;:{&quot;desktop&quot;:16,&quot;tablet&quot;:20,&quot;mobile&quot;:18}},&quot;btnColors&quot;:{&quot;color&quot;:&quot;rgba(25, 91, 150, 1)&quot;,&quot;bg&quot;:&quot;#ffffff&quot;},&quot;btnBorder&quot;:{&quot;radius&quot;:&quot;5px&quot;,&quot;width&quot;:&quot;&quot;,&quot;color&quot;:&quot;#0693e3&quot;},&quot;align&quot;:&quot;&quot;,&quot;isModal&quot;:false,&quot;isIcon&quot;:true,&quot;isText&quot;:true,&quot;btnText&quot;:&quot;Print&quot;,&quot;btnPadding&quot;:{&quot;vertical&quot;:&quot;5px&quot;,&quot;horizontal&quot;:&quot;15px&quot;},&quot;btnShadow&quot;:[]}'>\r\n\t<style>\r\n\t\t#ppbPrintPage-1 .ppbPrintPage button{ font-weight: 400;font-size: 16px;font-style: normal;text-transform: none;text-decoration: auto;line-height: 135%;letter-spacing: 0px; } @media (max-width: 768px) { #ppbPrintPage-1 .ppbPrintPage button{ font-size: 20px; } } @media (max-width: 576px) { #ppbPrintPage-1 .ppbPrintPage button{ font-size: 18px; } }\r\n\t#ppbPrintPage-1 .ppbPrintPage{\r\n\t\ttext-align: left;\r\n\t}\r\n\t#ppbPrintPage-1 .ppbPrintPage button{\r\n\t\tcolor: rgba(25, 91, 150, 1);background: #ffffff;\r\n\t\tpadding: 5px 15px;\r\n\t\tborder-radius: 5px;\r\n\t\tbox-shadow: 0px 0px 0px 0px #7090b0 ;\r\n\t}\r\n\t<\/style>\r\n\r\n\t<div class='ppbPrintPage'>\r\n\t\t<button>\r\n\t\t\t<svg xmlns='http:\/\/www.w3.org\/2000\/svg' width='30' height='30' viewBox='0 0 24 24' strokeWidth='2' strokeLinejoin='round' stroke='currentColor' style='fill: none;'>\r\n\t\t\t\t<polyline points='6 9 6 2 18 2 18 9' \/>\r\n\t\t\t\t<path d='M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2' \/>\r\n\t\t\t\t<rect x='6' y='14' width='12' height='8' \/>\r\n\t\t\t<\/svg>\t\r\n\r\n\t\t\t<span>Print<\/span>\t\t<\/button>\r\n\t<\/div>\r\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Visual Basic for Applications script to merge multiple .xlsx files generated from D365 > Project Management and Accounting > Enquiries and Reports > Moody Project Report In Excel, use Alt + F11 to invoke the Visual Basic for Applications tool,<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","knowledgebase_cat":[45],"knowledgebase_tag":[187,186,185],"class_list":["post-578","knowledgebase","type-knowledgebase","status-publish","hentry","knowledgebase_cat-excel","knowledgebase_tag-d365","knowledgebase_tag-projects","knowledgebase_tag-vba"],"_links":{"self":[{"href":"https:\/\/moodytech.uk\/kb\/wp-json\/wp\/v2\/knowledgebase\/578","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/moodytech.uk\/kb\/wp-json\/wp\/v2\/knowledgebase"}],"about":[{"href":"https:\/\/moodytech.uk\/kb\/wp-json\/wp\/v2\/types\/knowledgebase"}],"author":[{"embeddable":true,"href":"https:\/\/moodytech.uk\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/moodytech.uk\/kb\/wp-json\/wp\/v2\/comments?post=578"}],"version-history":[{"count":19,"href":"https:\/\/moodytech.uk\/kb\/wp-json\/wp\/v2\/knowledgebase\/578\/revisions"}],"predecessor-version":[{"id":601,"href":"https:\/\/moodytech.uk\/kb\/wp-json\/wp\/v2\/knowledgebase\/578\/revisions\/601"}],"wp:attachment":[{"href":"https:\/\/moodytech.uk\/kb\/wp-json\/wp\/v2\/media?parent=578"}],"wp:term":[{"taxonomy":"knowledgebase_cat","embeddable":true,"href":"https:\/\/moodytech.uk\/kb\/wp-json\/wp\/v2\/knowledgebase_cat?post=578"},{"taxonomy":"knowledgebase_tag","embeddable":true,"href":"https:\/\/moodytech.uk\/kb\/wp-json\/wp\/v2\/knowledgebase_tag?post=578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}