{"id":55000546,"date":"2022-02-01T00:00:00","date_gmt":"2022-02-01T00:00:00","guid":{"rendered":"http:\/\/access-basics.de\/546"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-30T00:00:00","slug":"Die_Option_ExplicitAnweisung","status":"publish","type":"post","link":"https:\/\/access-basics.de\/index.php\/Die_Option_ExplicitAnweisung.html","title":{"rendered":"Die Option Explicit-Anweisung"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/vg08.met.vgwort.de\/na\/e8e6cb5670634739bbd9373dc2c2d728\" width=\"1\" height=\"1\" alt=\"\"><\/p>\n<p class='introduction'>Es gibt einige wenige Optionen in VBA-Projekten, die Sie modulabh&auml;ngig festlegen k&ouml;nnen. Eine davon hei&szlig;t &#8222;Option Explicit&#8220;. Diese Anweisung legt fest, dass in einem Modul keine Variablen verwendet werden d&uuml;rfen, die nicht deklariert wurden. In diesem Artikel schauen wir uns an, wie sich das in der Praxis auswirkt, wie Sie sicherstellen k&ouml;nnen, dass &#8222;Option Explicit&#8220; immer automatisch hinzugef&uuml;gt wird und dass viele Probleme in Softwareprojekten entstehen, weil Microsoft uns diese Option nicht automatisch bereitstellt.<\/p>\n<h2>Standardverhalten: Kein Option Explicit!<\/h2>\n<p>Wenn Sie bereits einmal ein Modul in einem VBA-Projekt einer Access-Anwendung angelegt haben, ist Ihnen die Anweisung <b>Option Compare Database <\/b>bekannt, die immer oben im Modul steht.<\/p>\n<p>Wenn Sie Access frisch installiert haben oder wenn Sie noch keine &Auml;nderungen an den Optionen des VBA-Editors vorgenommen haben, sieht ein neues Modul immer wie in Bild 1 aus.<\/p>\n<p class=\"image\"><a rel=\"lightbox\" href=\"..\/tl_files\/images\/pic_546_001.png\"><img decoding=\"async\" src=\"..\/tl_files\/images\/pic_546_001.png\" alt=\"So sieht ein neues Modul standardm&auml;&szlig;ig aus.\" width=\"325\" \/><\/a><\/p>\n<p class='imagetext'>Bild 1: So sieht ein neues Modul standardm&auml;&szlig;ig aus.<\/p>\n<p>Die dort enthaltene Anweisung <b>Option Compare Database <\/b>legt fest, wie Vergleiche von Zeichenfolgen stattfinden, aber das ist ein anderes Thema.<\/p>\n<h2>Weniger Aufwand ohne Deklaration<\/h2>\n<p>Wenn Sie in einem solchem Modul VBA-Prozeduren programmieren, sind Sie richtig flexibel: Sie brauchen n&auml;mlich Variablen nicht zu deklarieren.<\/p>\n<p>Sie k&ouml;nnen dann in einer Prozedur wie der folgenden einfach eine Variable namens <b>strInput <\/b>nutzen und sparen sich die Tipperei f&uuml;r die Variablendeklaration:<\/p>\n<pre><span style=\"color:blue;\">Option Compare Database<\/span>\r\n<span style=\"color:blue;\">Public Sub <\/span>OhneDeklaration()\r\n     strInput = InputBox(\"Geben Sie einen Text ein.\")\r\n     <span style=\"color:blue;\">MsgBox<\/span> \"Eingegebener Text:\" & <span style=\"color:blue;\"><span style=\"color:blue;\">vbCrLf<\/span><\/span> & strInput\r\n<span style=\"color:blue;\">End Sub<\/span><\/pre>\n<p>Die Prozedur funktioniert genauso, als wenn Sie die Variable <b>strInput <\/b>deklariert h&auml;tten.<\/p>\n<h2>Probleme ohne Option Explicit sind vorprogrammiert<\/h2>\n<p>Wenn Sie ohne Deklaration arbeiten, k&ouml;nnen verschiedene Probleme auftauchen:<\/p>\n<ul>\n<li>Variablen erhalten standardm&auml;&szlig;ig den Datentyp <b>Variant<\/b>.<\/li>\n<li>Schreibfehler in Variablen k&ouml;nnen zu logischen Fehlern f&uuml;hren.<\/li>\n<li>Der G&uuml;ltigkeitsbereich einer Variablen ist nicht definiert.<\/li>\n<\/ul>\n<p>Wie sich diese Fehler auswirken, schauen wir uns in den folgenden Abschnitten an.<\/p>\n<h2>Nicht deklarierte Variablen erhalten den Datentyp Variant<\/h2>\n<p>Das Problem mit relativ geringen Auswirkungen ist, dass Variablen, die nicht deklariert werden, automatisch den Datentyp <b>Variant <\/b>erhalten.<\/p>\n<p>Das ist &uuml;brigens auch der Fall, wenn Sie eine Variable ohne Angabe eines Datentyps deklarieren. Das Problem hierbei ist, dass der Datentyp <b>Variant <\/b>den meisten Speicherplatz ben&ouml;tigt.<\/p>\n<h2>Schreibfehler f&uuml;hren zu logischen Fehlern<\/h2>\n<p>Etwas problematischer ist die Tatsache, dass Schreibfehler bei Verwendung der Variablen nicht als Fehler gemeldet werden.<\/p>\n<p>Wenn Sie also beispielsweise einmal die Schreibweise <b>strInput <\/b>und einmal die Schreibweise <b>str_Input <\/b>verwenden, k&ouml;nnte die Prozedur von oben wie folgt aussehen:<\/p>\n<pre><span style=\"color:blue;\">Public Sub <\/span>OhneDeklaration()\r\n     strInput = InputBox(\"Geben Sie einen Text ein.\")\r\n     <span style=\"color:blue;\">MsgBox<\/span> \"Eingegebener Text:\" & <span style=\"color:blue;\"><span style=\"color:blue;\">vbCrLf<\/span><\/span> & str_Input\r\n<span style=\"color:blue;\">End Sub<\/span><\/pre>\n<p>Egal, welchen Text Sie nun in die <b>InputBox <\/b>eingeben, Sie erhalten immer eine leere Zeichenkette in der <b>MsgBox<\/b> &#8211; denn <b>str_Input <\/b>wird niemals mit einem Wert gef&uuml;llt.<\/p>\n<h2>G&uuml;ltigkeitsbereich der Variablen ist nicht deklariert<\/h2>\n<div class=\"rcp_restricted\"><p><span style=\"color: #ff0000\">M&ouml;chten Sie weiterlesen? Dann l&ouml;sen Sie Ihr Ticket!<\/span><br \/>\n<span style=\"color: #ff0000\">Hier geht es zur Bestellung des Jahresabonnements des Magazins <strong>Access &#091;basics&#093;<\/strong>:<\/span><br \/>\n<span style=\"color: #ff0000\"><a style=\"color: #ff0000\" href=\"https:\/\/shop.minhorst.com\/magazine\/282\/access-basics?c=77\">Zur Bestellung ...<\/a><\/span><br \/>\n<span style=\"color: #ff0000\">Danach greifen Sie sofort auf <strong>alle rund 400 Artikel<\/strong> unseres Angebots zu - auch auf diesen hier!<\/span><br \/>\n<span style=\"color: #000000\">Oder haben Sie bereits Zugangsdaten? Dann loggen Sie sich gleich hier ein:<\/span><\/p>\n<\/div>\n\n\t\n\t<form id=\"rcp_login_form\"  class=\"rcp_form\" method=\"POST\" action=\"https:\/\/access-basics.de\/data\/wp\/v2\/posts\/55000546\/\">\n\n\t\t\n\t\t<fieldset class=\"rcp_login_data\">\n\t\t\t<p>\n\t\t\t\t<label for=\"rcp_user_login\">Username or Email<\/label>\n\t\t\t\t<input name=\"rcp_user_login\" id=\"rcp_user_login\" class=\"required\" type=\"text\"\/>\n\t\t\t<\/p>\n\t\t\t<p>\n\t\t\t\t<label for=\"rcp_user_pass\">Passwort<\/label>\n\t\t\t\t<input name=\"rcp_user_pass\" id=\"rcp_user_pass\" class=\"required\" type=\"password\"\/>\n\t\t\t<\/p>\n\t\t\t\t\t\t<p>\n\t\t\t\t<input type=\"checkbox\" name=\"rcp_user_remember\" id=\"rcp_user_remember\" value=\"1\"\/>\n\t\t\t\t<label for=\"rcp_user_remember\">Angemeldet bleiben<\/label>\n\t\t\t<\/p>\n\t\t\t<p class=\"rcp_lost_password\"><a href=\"\/index.php\/data\/wp\/v2\/posts\/55000546?rcp_action=lostpassword\"><\/a><\/p>\n\t\t\t<p>\n\t\t\t\t<input type=\"hidden\" name=\"rcp_action\" value=\"login\"\/>\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"rcp_redirect\" value=\"https:\/\/access-basics.de\/data\/wp\/v2\/posts\/55000546\/\"\/>\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"rcp_login_nonce\" value=\"7c3fd47b09\"\/>\n\t\t\t\t<input id=\"rcp_login_submit\" class=\"rcp-button\" type=\"submit\" value=\"Anmelden\"\/>\n\t\t\t<\/p>\n\t\t\t\t\t<\/fieldset>\n\n\t\t\n\t<\/form>\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Es gibt einige wenige Optionen in VBA-Projekten, die Sie modulabh&auml;ngig festlegen k&ouml;nnen. Eine davon hei&szlig;t &#8222;Option Explicit&#8220;. Diese Anweisung legt fest, dass in einem Modul keine Variablen verwendet werden d&uuml;rfen, die nicht deklariert wurden. In diesem Artikel schauen wir uns an, wie sich das in der Praxis auswirkt, wie Sie sicherstellen k&ouml;nnen, dass &#8222;Option Explicit&#8220; immer automatisch hinzugef&uuml;gt wird und dass viele Probleme in Softwareprojekten entstehen, weil Microsoft uns diese Option nicht automatisch bereitstellt.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[66012022,662022,44000011],"tags":[],"class_list":["post-55000546","post","type-post","status-publish","format-standard","hentry","category-66012022","category-662022","category-VBAGrundlagen"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.5.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Es gibt einige wenige Optionen in VBA-Projekten, die Sie modulabh\u00e4ngig festlegen k\u00f6nnen. Eine davon hei\u00dft &quot;Option Explicit&quot;. Diese Anweisung legt fest, dass in einem Modul keine Variablen verwendet werden d\u00fcrfen, die nicht deklariert wurden. In diesem Artikel schauen wir uns an, wie sich das in der Praxis auswirkt, wie Sie sicherstellen k\u00f6nnen, dass &quot;Option Explicit&quot; immer automatisch hinzugef\u00fcgt wird und dass viele Probleme in Softwareprojekten entstehen, weil Microsoft uns diese Option nicht automatisch bereitstellt.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Andr\u00e9 Minhorst\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/access-basics.de\/index.php\/Die_Option_ExplicitAnweisung.html\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.5.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"de_DE\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Access [basics] - DAS ACCESS-MAGAZIN F\u00dcR ALLE, DIE VON 0 AUF 100 WOLLEN\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Die Option Explicit-Anweisung - Access [basics]\" \/>\n\t\t<meta property=\"og:description\" content=\"Es gibt einige wenige Optionen in VBA-Projekten, die Sie modulabh\u00e4ngig festlegen k\u00f6nnen. Eine davon hei\u00dft &quot;Option Explicit&quot;. Diese Anweisung legt fest, dass in einem Modul keine Variablen verwendet werden d\u00fcrfen, die nicht deklariert wurden. In diesem Artikel schauen wir uns an, wie sich das in der Praxis auswirkt, wie Sie sicherstellen k\u00f6nnen, dass &quot;Option Explicit&quot; immer automatisch hinzugef\u00fcgt wird und dass viele Probleme in Softwareprojekten entstehen, weil Microsoft uns diese Option nicht automatisch bereitstellt.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/access-basics.de\/index.php\/Die_Option_ExplicitAnweisung.html\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/access-basics.de\/wp-content\/uploads\/2021\/02\/logo400.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/access-basics.de\/wp-content\/uploads\/2021\/02\/logo400.png\" \/>\n\t\t<meta property=\"og:image:width\" content=\"400\" \/>\n\t\t<meta property=\"og:image:height\" content=\"127\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2022-02-01T00:00:00+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"-001-11-30T00:00:00+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Die Option Explicit-Anweisung - Access [basics]\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Es gibt einige wenige Optionen in VBA-Projekten, die Sie modulabh\u00e4ngig festlegen k\u00f6nnen. Eine davon hei\u00dft &quot;Option Explicit&quot;. Diese Anweisung legt fest, dass in einem Modul keine Variablen verwendet werden d\u00fcrfen, die nicht deklariert wurden. In diesem Artikel schauen wir uns an, wie sich das in der Praxis auswirkt, wie Sie sicherstellen k\u00f6nnen, dass &quot;Option Explicit&quot; immer automatisch hinzugef\u00fcgt wird und dass viele Probleme in Softwareprojekten entstehen, weil Microsoft uns diese Option nicht automatisch bereitstellt.\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/access-basics.de\/wp-content\/uploads\/2021\/02\/logo400.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/Die_Option_ExplicitAnweisung.html#blogposting\",\"name\":\"Die Option Explicit-Anweisung - Access [basics]\",\"headline\":\"Die Option Explicit-Anweisung\",\"author\":{\"@id\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/author\\\/andreminhorst-com#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/access-basics.de\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"http:\\\/\\\/vg08.met.vgwort.de\\\/na\\\/e8e6cb5670634739bbd9373dc2c2d728\",\"@id\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/Die_Option_ExplicitAnweisung.html\\\/#articleImage\"},\"datePublished\":\"2022-02-01T00:00:00+00:00\",\"dateModified\":\"-0001-11-30T00:00:00+00:00\",\"inLanguage\":\"de-DE\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/Die_Option_ExplicitAnweisung.html#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/Die_Option_ExplicitAnweisung.html#webpage\"},\"articleSection\":\"1\\\/2022, 2022, VBA-Grundlagen\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/Die_Option_ExplicitAnweisung.html#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/access-basics.de\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/access-basics.de\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/category\\\/2022#listItem\",\"name\":\"2022\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/category\\\/2022#listItem\",\"position\":2,\"name\":\"2022\",\"item\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/category\\\/2022\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/category\\\/2022\\\/1\\\/2022#listItem\",\"name\":\"1\\\/2022\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/access-basics.de\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/category\\\/2022\\\/1\\\/2022#listItem\",\"position\":3,\"name\":\"1\\\/2022\",\"item\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/category\\\/2022\\\/1\\\/2022\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/Die_Option_ExplicitAnweisung.html#listItem\",\"name\":\"Die Option Explicit-Anweisung\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/category\\\/2022#listItem\",\"name\":\"2022\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/Die_Option_ExplicitAnweisung.html#listItem\",\"position\":4,\"name\":\"Die Option Explicit-Anweisung\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/category\\\/2022\\\/1\\\/2022#listItem\",\"name\":\"1\\\/2022\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/access-basics.de\\\/#organization\",\"name\":\"Access [basics]\",\"description\":\"DAS ACCESS-MAGAZIN F\\u00dcR ALLE, DIE VON 0 AUF 100 WOLLEN\",\"url\":\"https:\\\/\\\/access-basics.de\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/access-basics.de\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/logo400.png\",\"@id\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/Die_Option_ExplicitAnweisung.html\\\/#organizationLogo\",\"width\":400,\"height\":127},\"image\":{\"@id\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/Die_Option_ExplicitAnweisung.html\\\/#organizationLogo\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/author\\\/andreminhorst-com#author\",\"url\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/author\\\/andreminhorst-com\",\"name\":\"Andr\\u00e9 Minhorst\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/Die_Option_ExplicitAnweisung.html#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1b9d010cf1716692cb9c34f21554e07d17d461acaea5b61b8cb21cbec678d48a?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Andr\\u00e9 Minhorst\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/Die_Option_ExplicitAnweisung.html#webpage\",\"url\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/Die_Option_ExplicitAnweisung.html\",\"name\":\"Die Option Explicit-Anweisung - Access [basics]\",\"description\":\"Es gibt einige wenige Optionen in VBA-Projekten, die Sie modulabh\\u00e4ngig festlegen k\\u00f6nnen. Eine davon hei\\u00dft \\\"Option Explicit\\\". Diese Anweisung legt fest, dass in einem Modul keine Variablen verwendet werden d\\u00fcrfen, die nicht deklariert wurden. In diesem Artikel schauen wir uns an, wie sich das in der Praxis auswirkt, wie Sie sicherstellen k\\u00f6nnen, dass \\\"Option Explicit\\\" immer automatisch hinzugef\\u00fcgt wird und dass viele Probleme in Softwareprojekten entstehen, weil Microsoft uns diese Option nicht automatisch bereitstellt.\",\"inLanguage\":\"de-DE\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/access-basics.de\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/Die_Option_ExplicitAnweisung.html#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/author\\\/andreminhorst-com#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/access-basics.de\\\/index.php\\\/author\\\/andreminhorst-com#author\"},\"datePublished\":\"2022-02-01T00:00:00+00:00\",\"dateModified\":\"-0001-11-30T00:00:00+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/access-basics.de\\\/#website\",\"url\":\"https:\\\/\\\/access-basics.de\\\/\",\"name\":\"Access [basics]\",\"description\":\"DAS ACCESS-MAGAZIN F\\u00dcR ALLE, DIE VON 0 AUF 100 WOLLEN\",\"inLanguage\":\"de-DE\",\"publisher\":{\"@id\":\"https:\\\/\\\/access-basics.de\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Die Option Explicit-Anweisung - Access [basics]","description":"Es gibt einige wenige Optionen in VBA-Projekten, die Sie modulabh\u00e4ngig festlegen k\u00f6nnen. Eine davon hei\u00dft \"Option Explicit\". Diese Anweisung legt fest, dass in einem Modul keine Variablen verwendet werden d\u00fcrfen, die nicht deklariert wurden. In diesem Artikel schauen wir uns an, wie sich das in der Praxis auswirkt, wie Sie sicherstellen k\u00f6nnen, dass \"Option Explicit\" immer automatisch hinzugef\u00fcgt wird und dass viele Probleme in Softwareprojekten entstehen, weil Microsoft uns diese Option nicht automatisch bereitstellt.","canonical_url":"https:\/\/access-basics.de\/index.php\/Die_Option_ExplicitAnweisung.html","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/access-basics.de\/index.php\/Die_Option_ExplicitAnweisung.html#blogposting","name":"Die Option Explicit-Anweisung - Access [basics]","headline":"Die Option Explicit-Anweisung","author":{"@id":"https:\/\/access-basics.de\/index.php\/author\/andreminhorst-com#author"},"publisher":{"@id":"https:\/\/access-basics.de\/#organization"},"image":{"@type":"ImageObject","url":"http:\/\/vg08.met.vgwort.de\/na\/e8e6cb5670634739bbd9373dc2c2d728","@id":"https:\/\/access-basics.de\/index.php\/Die_Option_ExplicitAnweisung.html\/#articleImage"},"datePublished":"2022-02-01T00:00:00+00:00","dateModified":"-0001-11-30T00:00:00+00:00","inLanguage":"de-DE","mainEntityOfPage":{"@id":"https:\/\/access-basics.de\/index.php\/Die_Option_ExplicitAnweisung.html#webpage"},"isPartOf":{"@id":"https:\/\/access-basics.de\/index.php\/Die_Option_ExplicitAnweisung.html#webpage"},"articleSection":"1\/2022, 2022, VBA-Grundlagen"},{"@type":"BreadcrumbList","@id":"https:\/\/access-basics.de\/index.php\/Die_Option_ExplicitAnweisung.html#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/access-basics.de\/#listItem","position":1,"name":"Home","item":"https:\/\/access-basics.de\/","nextItem":{"@type":"ListItem","@id":"https:\/\/access-basics.de\/index.php\/category\/2022#listItem","name":"2022"}},{"@type":"ListItem","@id":"https:\/\/access-basics.de\/index.php\/category\/2022#listItem","position":2,"name":"2022","item":"https:\/\/access-basics.de\/index.php\/category\/2022","nextItem":{"@type":"ListItem","@id":"https:\/\/access-basics.de\/index.php\/category\/2022\/1\/2022#listItem","name":"1\/2022"},"previousItem":{"@type":"ListItem","@id":"https:\/\/access-basics.de\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/access-basics.de\/index.php\/category\/2022\/1\/2022#listItem","position":3,"name":"1\/2022","item":"https:\/\/access-basics.de\/index.php\/category\/2022\/1\/2022","nextItem":{"@type":"ListItem","@id":"https:\/\/access-basics.de\/index.php\/Die_Option_ExplicitAnweisung.html#listItem","name":"Die Option Explicit-Anweisung"},"previousItem":{"@type":"ListItem","@id":"https:\/\/access-basics.de\/index.php\/category\/2022#listItem","name":"2022"}},{"@type":"ListItem","@id":"https:\/\/access-basics.de\/index.php\/Die_Option_ExplicitAnweisung.html#listItem","position":4,"name":"Die Option Explicit-Anweisung","previousItem":{"@type":"ListItem","@id":"https:\/\/access-basics.de\/index.php\/category\/2022\/1\/2022#listItem","name":"1\/2022"}}]},{"@type":"Organization","@id":"https:\/\/access-basics.de\/#organization","name":"Access [basics]","description":"DAS ACCESS-MAGAZIN F\u00dcR ALLE, DIE VON 0 AUF 100 WOLLEN","url":"https:\/\/access-basics.de\/","logo":{"@type":"ImageObject","url":"https:\/\/access-basics.de\/wp-content\/uploads\/2021\/02\/logo400.png","@id":"https:\/\/access-basics.de\/index.php\/Die_Option_ExplicitAnweisung.html\/#organizationLogo","width":400,"height":127},"image":{"@id":"https:\/\/access-basics.de\/index.php\/Die_Option_ExplicitAnweisung.html\/#organizationLogo"}},{"@type":"Person","@id":"https:\/\/access-basics.de\/index.php\/author\/andreminhorst-com#author","url":"https:\/\/access-basics.de\/index.php\/author\/andreminhorst-com","name":"Andr\u00e9 Minhorst","image":{"@type":"ImageObject","@id":"https:\/\/access-basics.de\/index.php\/Die_Option_ExplicitAnweisung.html#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/1b9d010cf1716692cb9c34f21554e07d17d461acaea5b61b8cb21cbec678d48a?s=96&d=mm&r=g","width":96,"height":96,"caption":"Andr\u00e9 Minhorst"}},{"@type":"WebPage","@id":"https:\/\/access-basics.de\/index.php\/Die_Option_ExplicitAnweisung.html#webpage","url":"https:\/\/access-basics.de\/index.php\/Die_Option_ExplicitAnweisung.html","name":"Die Option Explicit-Anweisung - Access [basics]","description":"Es gibt einige wenige Optionen in VBA-Projekten, die Sie modulabh\u00e4ngig festlegen k\u00f6nnen. Eine davon hei\u00dft \"Option Explicit\". Diese Anweisung legt fest, dass in einem Modul keine Variablen verwendet werden d\u00fcrfen, die nicht deklariert wurden. In diesem Artikel schauen wir uns an, wie sich das in der Praxis auswirkt, wie Sie sicherstellen k\u00f6nnen, dass \"Option Explicit\" immer automatisch hinzugef\u00fcgt wird und dass viele Probleme in Softwareprojekten entstehen, weil Microsoft uns diese Option nicht automatisch bereitstellt.","inLanguage":"de-DE","isPartOf":{"@id":"https:\/\/access-basics.de\/#website"},"breadcrumb":{"@id":"https:\/\/access-basics.de\/index.php\/Die_Option_ExplicitAnweisung.html#breadcrumblist"},"author":{"@id":"https:\/\/access-basics.de\/index.php\/author\/andreminhorst-com#author"},"creator":{"@id":"https:\/\/access-basics.de\/index.php\/author\/andreminhorst-com#author"},"datePublished":"2022-02-01T00:00:00+00:00","dateModified":"-0001-11-30T00:00:00+00:00"},{"@type":"WebSite","@id":"https:\/\/access-basics.de\/#website","url":"https:\/\/access-basics.de\/","name":"Access [basics]","description":"DAS ACCESS-MAGAZIN F\u00dcR ALLE, DIE VON 0 AUF 100 WOLLEN","inLanguage":"de-DE","publisher":{"@id":"https:\/\/access-basics.de\/#organization"}}]},"og:locale":"de_DE","og:site_name":"Access [basics] - DAS ACCESS-MAGAZIN F\u00dcR ALLE, DIE VON 0 AUF 100 WOLLEN","og:type":"article","og:title":"Die Option Explicit-Anweisung - Access [basics]","og:description":"Es gibt einige wenige Optionen in VBA-Projekten, die Sie modulabh\u00e4ngig festlegen k\u00f6nnen. Eine davon hei\u00dft &quot;Option Explicit&quot;. Diese Anweisung legt fest, dass in einem Modul keine Variablen verwendet werden d\u00fcrfen, die nicht deklariert wurden. In diesem Artikel schauen wir uns an, wie sich das in der Praxis auswirkt, wie Sie sicherstellen k\u00f6nnen, dass &quot;Option Explicit&quot; immer automatisch hinzugef\u00fcgt wird und dass viele Probleme in Softwareprojekten entstehen, weil Microsoft uns diese Option nicht automatisch bereitstellt.","og:url":"https:\/\/access-basics.de\/index.php\/Die_Option_ExplicitAnweisung.html","og:image":"https:\/\/access-basics.de\/wp-content\/uploads\/2021\/02\/logo400.png","og:image:secure_url":"https:\/\/access-basics.de\/wp-content\/uploads\/2021\/02\/logo400.png","og:image:width":400,"og:image:height":127,"article:published_time":"2022-02-01T00:00:00+00:00","article:modified_time":"-001-11-30T00:00:00+00:00","twitter:card":"summary_large_image","twitter:title":"Die Option Explicit-Anweisung - Access [basics]","twitter:description":"Es gibt einige wenige Optionen in VBA-Projekten, die Sie modulabh\u00e4ngig festlegen k\u00f6nnen. Eine davon hei\u00dft &quot;Option Explicit&quot;. Diese Anweisung legt fest, dass in einem Modul keine Variablen verwendet werden d\u00fcrfen, die nicht deklariert wurden. In diesem Artikel schauen wir uns an, wie sich das in der Praxis auswirkt, wie Sie sicherstellen k\u00f6nnen, dass &quot;Option Explicit&quot; immer automatisch hinzugef\u00fcgt wird und dass viele Probleme in Softwareprojekten entstehen, weil Microsoft uns diese Option nicht automatisch bereitstellt.","twitter:image":"https:\/\/access-basics.de\/wp-content\/uploads\/2021\/02\/logo400.png"},"aioseo_meta_data":{"post_id":"55000546","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2024-01-27 22:11:13","updated":"2026-10-19 17:14:59","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/access-basics.de\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/access-basics.de\/index.php\/category\/2022\" title=\"2022\">2022<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/access-basics.de\/index.php\/category\/2022\/1\/2022\" title=\"1\/2022\">1\/2022<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tDie Option Explicit-Anweisung\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/access-basics.de\/"},{"label":"2022","link":"https:\/\/access-basics.de\/index.php\/category\/2022"},{"label":"1\/2022","link":"https:\/\/access-basics.de\/index.php\/category\/2022\/1\/2022"},{"label":"Die Option Explicit-Anweisung","link":"https:\/\/access-basics.de\/index.php\/Die_Option_ExplicitAnweisung.html"}],"_links":{"self":[{"href":"https:\/\/access-basics.de\/index.php\/data\/wp\/v2\/posts\/55000546","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/access-basics.de\/index.php\/data\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/access-basics.de\/index.php\/data\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/access-basics.de\/index.php\/data\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/access-basics.de\/index.php\/data\/wp\/v2\/comments?post=55000546"}],"version-history":[{"count":0,"href":"https:\/\/access-basics.de\/index.php\/data\/wp\/v2\/posts\/55000546\/revisions"}],"wp:attachment":[{"href":"https:\/\/access-basics.de\/index.php\/data\/wp\/v2\/media?parent=55000546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/access-basics.de\/index.php\/data\/wp\/v2\/categories?post=55000546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/access-basics.de\/index.php\/data\/wp\/v2\/tags?post=55000546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}