{"id":1603,"date":"2022-05-04T15:12:38","date_gmt":"2022-05-04T09:42:38","guid":{"rendered":"https:\/\/syskare.com\/blog\/?p=1603"},"modified":"2022-05-19T10:02:34","modified_gmt":"2022-05-19T04:32:34","slug":"lock-vba-code-in-excel","status":"publish","type":"post","link":"https:\/\/syskare.com\/blog\/lock-vba-code-in-excel\/","title":{"rendered":"How to Lock VBA Code in Excel 2016? Step by Step Guide"},"content":{"rendered":"<p>Many times, users find themselves in a scenario where they need to protect their vital data, files, and folders with a code, but they are unsure of how to go about it. Many users, for the same reason, want to lock VBA code in Excel, since, as we all know, VBA code is an advanced method of protecting your files and other information.<\/p>\n<p>Locking your vital data is very significant since it prevents the loss of your data as well as the change of your data by someone else without your knowledge. So, moving on to the subject at hand, we will provide you with thorough and accurate information on how to lock VBA code in Excel 2016 and other versions in this section.<\/p>\n<p>Many users are unfamiliar with VBA code; they only hear about it from other people or read about it someplace. I will explain what VBA code is and how it can be used to protect your excel spreadsheets in this article.<\/p>\n<p>Visible Basic for Applications is the abbreviation of VBA Excel Word, Excel, and PowerPoint all use VBA, Microsoft&#8217;s computer language for the Microsoft Office suite. Programming languages are used throughout the Office suite.<\/p>\n<h2>Reasons to Protect VBA Code in Excel with Password<\/h2>\n<p>Here we will show you some user queries, to clear out the requirements to lock VBA code in excel.<\/p>\n<div class=\"alert alert-info\">\u201cHello there, friends, I&#8217;m new to VBA coding in Excel, I&#8217;ve created a user form for myself and written some scripts and events for it; now I&#8217;d want to protect them so that no one can steal my code, but I&#8217;m not sure how to go about doing so. please\u201d<\/div>\n<div class=\"alert alert-info\">\u201cI have certain excel sheets that I got from my employer, such as an error sheet, as well as some other excel sheets that I use for work purposes. and I&#8217;d want to encode them using a VBA code. Is it feasible to lock VBA code in Excel by utilising VBA code?\u201d<\/div>\n<h2>How to Lock VBA Code in Excel Manually?<\/h2>\n<ol>\n<li>Open your excel sheet, which you want to lock with the VBA code.<\/li>\n<li>After that, click on the \u201c<strong>Developer<\/strong>\u201d tab and then press the \u201c<strong>Visual Basic for Application\u201d<\/strong> option.<\/li>\n<li>After that, a screen will appear, and then select the file and press on the \u201cTools\u201d tab from the ribbon and then choose the \u201c<strong>VBAProject Properties<\/strong>\u201d option from the list.\n<p class=\"my-4\"><img loading=\"lazy\" decoding=\"async\" class=\"img-fluid lazyload\" src=\"https:\/\/cdnxtra.com\/mn\/lock-vba-excel\/01-tools.webp\" alt=\"screen will appear to lock with the VBA code\" width=\"600\" height=\"400\" \/><\/p>\n<\/li>\n<li>Now put the name of the file.\n<p class=\"my-4\"><img loading=\"lazy\" decoding=\"async\" class=\"img-fluid lazyload\" src=\"https:\/\/cdnxtra.com\/mn\/lock-vba-excel\/02-file-name.webp\" alt=\"put the name of the file\" width=\"500\" height=\"400\" \/><\/p>\n<\/li>\n<li>After that, press on the \u201c<strong>Protections<\/strong>\u201d tab to lock the VBA code in excel.\n<p class=\"my-4\"><img loading=\"lazy\" decoding=\"async\" class=\"img-fluid lazyload\" src=\"https:\/\/cdnxtra.com\/mn\/lock-vba-excel\/03-protection-tab.webp\" alt=\" click on the Protections tab to lock with the VBA code\" width=\"500\" height=\"400\" \/><\/p>\n<\/li>\n<li>And then, check the \u201cLock Project for viewing\u201d box.\n<p class=\"my-4\"><img loading=\"lazy\" decoding=\"async\" class=\"img-fluid lazyload\" src=\"https:\/\/cdnxtra.com\/mn\/lock-vba-excel\/04-enable.webp\" alt=\" check the \u201cLock Project for viewing\u201d box\" width=\"500\" height=\"400\" \/><\/p>\n<\/li>\n<li>Lastly, enter the password in both boxes as per your needs.\n<p class=\"my-4\"><img loading=\"lazy\" decoding=\"async\" class=\"img-fluid lazyload\" src=\"https:\/\/cdnxtra.com\/mn\/lock-vba-excel\/05-add-password.webp\" alt=\"enter the password to lock with the VBA code\" width=\"500\" height=\"400\" \/><\/p>\n<\/li>\n<\/ol>\n<p>Now, most users secure their documents using VBA code, but most of the time, they forget their password, and so they look for queries such as &#8220;<a href=\"https:\/\/syskare.com\/blog\/unlock-vba-password-in-excel\/\" target=\"_blank\" rel=\"noopener\">how to Unlock VBA password in Excel<\/a>&#8221; or &#8220;<a href=\"https:\/\/syskare.com\/blog\/remove-vba-password-from-word\/\" target=\"_blank\" rel=\"noopener\">How to Remove Password from VBA Project in Word<\/a>,&#8221; among other similar inquiries. Not to fear, we have a way to <a href=\"https:\/\/syskare.com\/blog\/open-password-protected-powerpoint-using-vba\/\" target=\"_blank\" rel=\"noopener\">unlock your VBA password in PowerPoint<\/a> files, documents, spreadsheets, and other data that we will provide you in advance. Users will be able to effortlessly access their files if they forget their password for any reason.<\/p>\n<h3>Final Words<\/h3>\n<p>We covered all you needed to know about how to lock VBA code in Excel using free approaches in the section above. In this section, we discussed why users may desire to protect their sensitive data for a variety of reasons. As a result, consumers will have an easier time understanding why document protection is necessary. Also, if you happen to forget your password, there is an excellent and straightforward option to delete passwords from documents.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many times, users find themselves in a scenario where they need to protect their vital data, files, and folders with a code, but they are unsure of how to go <\/p>\n","protected":false},"author":2,"featured_media":1603,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-1603","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-remove-password"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Lock VBA Code in Excel 2016, 2019, 2021 and Other Older Versions<\/title>\n<meta name=\"description\" content=\"lock VBA code in excel with completely free techniques. Step by step guide to protect VBA code in excel with password using VBA code.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/syskare.com\/blog\/lock-vba-code-in-excel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Lock VBA Code in Excel 2016, 2019, 2021 and Other Older Versions\" \/>\n<meta property=\"og:description\" content=\"lock VBA code in excel with completely free techniques. Step by step guide to protect VBA code in excel with password using VBA code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/syskare.com\/blog\/lock-vba-code-in-excel\/\" \/>\n<meta property=\"og:site_name\" content=\"Syskare Official Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-05-04T09:42:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-05-19T04:32:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnxtra.com\/mn\/lock-vba-excel\/01-tools.webp\" \/>\n<meta name=\"author\" content=\"Kylen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kylen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/syskare.com\\\/blog\\\/lock-vba-code-in-excel\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/syskare.com\\\/blog\\\/lock-vba-code-in-excel\\\/\"},\"author\":{\"name\":\"Kylen\",\"@id\":\"https:\\\/\\\/syskare.com\\\/blog\\\/#\\\/schema\\\/person\\\/a34a260115953cbc2a30fbddabe29457\"},\"headline\":\"How to Lock VBA Code in Excel 2016? Step by Step Guide\",\"datePublished\":\"2022-05-04T09:42:38+00:00\",\"dateModified\":\"2022-05-19T04:32:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/syskare.com\\\/blog\\\/lock-vba-code-in-excel\\\/\"},\"wordCount\":621,\"image\":{\"@id\":\"https:\\\/\\\/syskare.com\\\/blog\\\/lock-vba-code-in-excel\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdnxtra.com\\\/feature\\\/lock-vba-code-in-excel.jpg\",\"articleSection\":[\"Remove Password\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/syskare.com\\\/blog\\\/lock-vba-code-in-excel\\\/\",\"url\":\"https:\\\/\\\/syskare.com\\\/blog\\\/lock-vba-code-in-excel\\\/\",\"name\":\"Lock VBA Code in Excel 2016, 2019, 2021 and Other Older Versions\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/syskare.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/syskare.com\\\/blog\\\/lock-vba-code-in-excel\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/syskare.com\\\/blog\\\/lock-vba-code-in-excel\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdnxtra.com\\\/feature\\\/lock-vba-code-in-excel.jpg\",\"datePublished\":\"2022-05-04T09:42:38+00:00\",\"dateModified\":\"2022-05-19T04:32:34+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/syskare.com\\\/blog\\\/#\\\/schema\\\/person\\\/a34a260115953cbc2a30fbddabe29457\"},\"description\":\"lock VBA code in excel with completely free techniques. Step by step guide to protect VBA code in excel with password using VBA code.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/syskare.com\\\/blog\\\/lock-vba-code-in-excel\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/syskare.com\\\/blog\\\/lock-vba-code-in-excel\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/syskare.com\\\/blog\\\/lock-vba-code-in-excel\\\/#primaryimage\",\"url\":\"https:\\\/\\\/cdnxtra.com\\\/feature\\\/lock-vba-code-in-excel.jpg\",\"contentUrl\":\"https:\\\/\\\/cdnxtra.com\\\/feature\\\/lock-vba-code-in-excel.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/syskare.com\\\/blog\\\/lock-vba-code-in-excel\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/syskare.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Lock VBA Code in Excel 2016? Step by Step Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/syskare.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/syskare.com\\\/blog\\\/\",\"name\":\"Syskare Official Blog\",\"description\":\"Explore Trending Technology\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/syskare.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/syskare.com\\\/blog\\\/#\\\/schema\\\/person\\\/a34a260115953cbc2a30fbddabe29457\",\"name\":\"Kylen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b9c4616c263ca17a380edfbaf3832f1404be26b01e4ad8c4356c6396e7eccd1?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b9c4616c263ca17a380edfbaf3832f1404be26b01e4ad8c4356c6396e7eccd1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b9c4616c263ca17a380edfbaf3832f1404be26b01e4ad8c4356c6396e7eccd1?s=96&d=mm&r=g\",\"caption\":\"Kylen\"},\"description\":\"I work as a technical content writer. I have a strong interest in researching and writing about creativity, technology, and digital marketing trends, among other topics.\",\"url\":\"https:\\\/\\\/syskare.com\\\/blog\\\/author\\\/kylen\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Lock VBA Code in Excel 2016, 2019, 2021 and Other Older Versions","description":"lock VBA code in excel with completely free techniques. Step by step guide to protect VBA code in excel with password using VBA code.","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:\/\/syskare.com\/blog\/lock-vba-code-in-excel\/","og_locale":"en_US","og_type":"article","og_title":"Lock VBA Code in Excel 2016, 2019, 2021 and Other Older Versions","og_description":"lock VBA code in excel with completely free techniques. Step by step guide to protect VBA code in excel with password using VBA code.","og_url":"https:\/\/syskare.com\/blog\/lock-vba-code-in-excel\/","og_site_name":"Syskare Official Blog","article_published_time":"2022-05-04T09:42:38+00:00","article_modified_time":"2022-05-19T04:32:34+00:00","og_image":[{"url":"https:\/\/cdnxtra.com\/mn\/lock-vba-excel\/01-tools.webp","type":"","width":"","height":""}],"author":"Kylen","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kylen","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/syskare.com\/blog\/lock-vba-code-in-excel\/#article","isPartOf":{"@id":"https:\/\/syskare.com\/blog\/lock-vba-code-in-excel\/"},"author":{"name":"Kylen","@id":"https:\/\/syskare.com\/blog\/#\/schema\/person\/a34a260115953cbc2a30fbddabe29457"},"headline":"How to Lock VBA Code in Excel 2016? Step by Step Guide","datePublished":"2022-05-04T09:42:38+00:00","dateModified":"2022-05-19T04:32:34+00:00","mainEntityOfPage":{"@id":"https:\/\/syskare.com\/blog\/lock-vba-code-in-excel\/"},"wordCount":621,"image":{"@id":"https:\/\/syskare.com\/blog\/lock-vba-code-in-excel\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnxtra.com\/feature\/lock-vba-code-in-excel.jpg","articleSection":["Remove Password"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/syskare.com\/blog\/lock-vba-code-in-excel\/","url":"https:\/\/syskare.com\/blog\/lock-vba-code-in-excel\/","name":"Lock VBA Code in Excel 2016, 2019, 2021 and Other Older Versions","isPartOf":{"@id":"https:\/\/syskare.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/syskare.com\/blog\/lock-vba-code-in-excel\/#primaryimage"},"image":{"@id":"https:\/\/syskare.com\/blog\/lock-vba-code-in-excel\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnxtra.com\/feature\/lock-vba-code-in-excel.jpg","datePublished":"2022-05-04T09:42:38+00:00","dateModified":"2022-05-19T04:32:34+00:00","author":{"@id":"https:\/\/syskare.com\/blog\/#\/schema\/person\/a34a260115953cbc2a30fbddabe29457"},"description":"lock VBA code in excel with completely free techniques. Step by step guide to protect VBA code in excel with password using VBA code.","breadcrumb":{"@id":"https:\/\/syskare.com\/blog\/lock-vba-code-in-excel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/syskare.com\/blog\/lock-vba-code-in-excel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/syskare.com\/blog\/lock-vba-code-in-excel\/#primaryimage","url":"https:\/\/cdnxtra.com\/feature\/lock-vba-code-in-excel.jpg","contentUrl":"https:\/\/cdnxtra.com\/feature\/lock-vba-code-in-excel.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/syskare.com\/blog\/lock-vba-code-in-excel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/syskare.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Lock VBA Code in Excel 2016? Step by Step Guide"}]},{"@type":"WebSite","@id":"https:\/\/syskare.com\/blog\/#website","url":"https:\/\/syskare.com\/blog\/","name":"Syskare Official Blog","description":"Explore Trending Technology","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/syskare.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/syskare.com\/blog\/#\/schema\/person\/a34a260115953cbc2a30fbddabe29457","name":"Kylen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b9c4616c263ca17a380edfbaf3832f1404be26b01e4ad8c4356c6396e7eccd1?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b9c4616c263ca17a380edfbaf3832f1404be26b01e4ad8c4356c6396e7eccd1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b9c4616c263ca17a380edfbaf3832f1404be26b01e4ad8c4356c6396e7eccd1?s=96&d=mm&r=g","caption":"Kylen"},"description":"I work as a technical content writer. I have a strong interest in researching and writing about creativity, technology, and digital marketing trends, among other topics.","url":"https:\/\/syskare.com\/blog\/author\/kylen\/"}]}},"_links":{"self":[{"href":"https:\/\/syskare.com\/blog\/wp-json\/wp\/v2\/posts\/1603","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/syskare.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/syskare.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/syskare.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/syskare.com\/blog\/wp-json\/wp\/v2\/comments?post=1603"}],"version-history":[{"count":0,"href":"https:\/\/syskare.com\/blog\/wp-json\/wp\/v2\/posts\/1603\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/syskare.com\/blog\/wp-json\/wp\/v2\/posts\/1603"}],"wp:attachment":[{"href":"https:\/\/syskare.com\/blog\/wp-json\/wp\/v2\/media?parent=1603"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/syskare.com\/blog\/wp-json\/wp\/v2\/categories?post=1603"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/syskare.com\/blog\/wp-json\/wp\/v2\/tags?post=1603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}