{"id":2162,"date":"2023-09-27T16:13:55","date_gmt":"2023-09-27T16:13:55","guid":{"rendered":"https:\/\/exceladvisor.org\/nl\/variabel-berichtenvenster\/"},"modified":"2023-12-06T05:48:31","modified_gmt":"2023-12-06T05:48:31","slug":"variabel-berichtenvenster","status":"publish","type":"page","link":"https:\/\/exceladvisor.org\/nl\/variabel-berichtenvenster\/","title":{"rendered":"Hoe gebruik ik een variabele in een berichtenvenster?"},"content":{"rendered":"<div class=\"excel-voor-de-inhoud\" id=\"excel-801305365\"><script type=\"text\/javascript\">\r\n\tatOptions = {\r\n\t\t'key' : 'c1158f160081d6540a8409e6925dab94',\r\n\t\t'format' : 'iframe',\r\n\t\t'height' : 250,\r\n\t\t'width' : 300,\r\n\t\t'params' : {}\r\n\t};\r\n<\/script>\r\n<script type=\"text\/javascript\" src=\"\/\/www.highperformanceformat.com\/c1158f160081d6540a8409e6925dab94\/invoke.js\"><\/script><\/div> <p>U kunt ook een <a href=\"https:\/\/exceladvisor.org\/nl\/variabelen\/\">variabele<\/a> in een berichtvenster gebruiken. Stel dat u een variabele heeft die een specifieke waarde in die variabele opslaat.<\/p><p> U kunt deze variabele nu in het <a href=\"https:\/\/exceladvisor.org\/nl\/vba-berichtbox\/\">berichtvenster<\/a> gebruiken om de waarde aan de gebruiker weer te geven. In het volgende voorbeeld hebben we een macro gebruikt waarbij we de for-lus hebben gebruikt en we een functie hebben om <a href=\"https:\/\/exceladvisor.org\/nl\/willekeurig-nummer\/\">een willekeurig getal te genereren<\/a> . <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60695\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/boite-de-message-variable-vba.png\" sizes=\"auto, \" srcset=\"\" alt=\"vba-variabele-berichtenbox\" width=\"760\" height=\"486\"><\/figure><\/div><p> Wanneer u <a href=\"https:\/\/exceladvisor.org\/nl\/voer-een-macro-uit-2\/\">deze code uitvoert<\/a> , wordt deze 10 keer herhaald, genereert vervolgens een willekeurig getal en slaat dat getal op in de variabele. In de volgende coderegel hebben we dezelfde variabele gebruikt om de waarde in het berichtvenster weer te geven. <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60696\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/boite-de-message-variable-vba1.png\" sizes=\"auto, \" srcset=\"\" alt=\"\" width=\"161\" height=\"191\"><\/figure><\/div><pre class=\"wp-block-code\"> <code class=\"language-visual-basic\" lang=\"visual-basic\">Sub generateRandomNumber() Dim i As Integer, rNumber As Integer i = 10 For i = 1 To i rNumber = WorksheetFunction.RandBetween(1000, 2000) MsgBox rNumber Next i End Sub<\/code><\/pre><div class=\"gb-container gb-container-4db6181c gb-container-mt\"> <a class=\"gb-button gb-button-c5897111 gb-button-text gb-button-mt-button\" href=\"https:\/\/exceladvisor.org\/nl\/vba\/\">Wat is VBA<\/a><h2 class=\"gb-headline gb-headline-665e5f6b gb-headline-text gb-headline-mt-heading\"> Gerelateerde tutorials <\/h2><div class=\"gb-grid-wrapper gb-grid-wrapper-a20baf7c gb-grid-wrapper-mt-grid\"><div class=\"gb-grid-column gb-grid-column-65ddf67e\"><div class=\"gb-container gb-container-65ddf67e\"><ul><li> <a href=\"https:\/\/exceladvisor.org\/nl\/globale-variabele\/\">Declareer een globale (openbare) variabele in VBA<\/a><\/li><li> <a href=\"https:\/\/exceladvisor.org\/nl\/variabel-bereik\/\">Gebruik een bereik of cel als variabele in VBA<\/a><\/li><li> <a href=\"https:\/\/exceladvisor.org\/nl\/expliciete-optie-2\/\">Expliciete optieverklaring in VBA<\/a><\/li><li> <a href=\"https:\/\/exceladvisor.org\/nl\/zwak\/\">Dim VBA-instructie<\/a><\/li><li> <a href=\"https:\/\/exceladvisor.org\/nl\/variabelen\/\">VBA-variabelen (declareren, gegevenstypen en bereik)<\/a> <\/li><\/ul><\/div><\/div><div class=\"gb-grid-column gb-grid-column-50067b57\"><div class=\"gb-container gb-container-50067b57\"><\/div><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"ub_ctt_via":"","footnotes":""},"class_list":["post-2162","page","type-page","status-publish","hentry"],"featured_image_src":null,"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Hoe gebruik ik een variabele in een berichtenvenster?<\/title>\n<meta name=\"description\" content=\"U kunt ook een variabele in een berichtvenster gebruiken. Laten we zeggen dat je een variabele hebt die\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/exceladvisor.org\/nl\/variabel-berichtenvenster\/\" \/>\n<meta property=\"og:locale\" content=\"nl_NL\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hoe gebruik ik een variabele in een berichtenvenster?\" \/>\n<meta property=\"og:description\" content=\"U kunt ook een variabele in een berichtvenster gebruiken. Laten we zeggen dat je een variabele hebt die\" \/>\n<meta property=\"og:url\" content=\"https:\/\/exceladvisor.org\/nl\/variabel-berichtenvenster\/\" \/>\n<meta property=\"og:site_name\" content=\"Excel Advisor\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-06T05:48:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/boite-de-message-variable-vba.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Geschatte leestijd\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minuut\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/exceladvisor.org\/nl\/variabel-berichtenvenster\/\",\"url\":\"https:\/\/exceladvisor.org\/nl\/variabel-berichtenvenster\/\",\"name\":\"Hoe gebruik ik een variabele in een berichtenvenster?\",\"isPartOf\":{\"@id\":\"https:\/\/exceladvisor.org\/nl\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/exceladvisor.org\/nl\/variabel-berichtenvenster\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/exceladvisor.org\/nl\/variabel-berichtenvenster\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/boite-de-message-variable-vba.png\",\"datePublished\":\"2023-09-27T16:13:55+00:00\",\"dateModified\":\"2023-12-06T05:48:31+00:00\",\"description\":\"U kunt ook een variabele in een berichtvenster gebruiken. Laten we zeggen dat je een variabele hebt die\",\"breadcrumb\":{\"@id\":\"https:\/\/exceladvisor.org\/nl\/variabel-berichtenvenster\/#breadcrumb\"},\"inLanguage\":\"nl-NL\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/exceladvisor.org\/nl\/variabel-berichtenvenster\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"nl-NL\",\"@id\":\"https:\/\/exceladvisor.org\/nl\/variabel-berichtenvenster\/#primaryimage\",\"url\":\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/boite-de-message-variable-vba.png\",\"contentUrl\":\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/boite-de-message-variable-vba.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/exceladvisor.org\/nl\/variabel-berichtenvenster\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Thuis\",\"item\":\"https:\/\/exceladvisor.org\/nl\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hoe gebruik ik een variabele in een berichtenvenster?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/exceladvisor.org\/nl\/#website\",\"url\":\"https:\/\/exceladvisor.org\/nl\/\",\"name\":\"Excel Advisor\",\"description\":\"Uw gids voor datadominantie\",\"publisher\":{\"@id\":\"https:\/\/exceladvisor.org\/nl\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/exceladvisor.org\/nl\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"nl-NL\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/exceladvisor.org\/nl\/#organization\",\"name\":\"Excel Advisor\",\"url\":\"https:\/\/exceladvisor.org\/nl\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"nl-NL\",\"@id\":\"https:\/\/exceladvisor.org\/nl\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/exceladvisor.org\/nl\/wp-content\/uploads\/2023\/12\/exceladvisor.org_.png\",\"contentUrl\":\"https:\/\/exceladvisor.org\/nl\/wp-content\/uploads\/2023\/12\/exceladvisor.org_.png\",\"width\":105,\"height\":36,\"caption\":\"Excel Advisor\"},\"image\":{\"@id\":\"https:\/\/exceladvisor.org\/nl\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Hoe gebruik ik een variabele in een berichtenvenster?","description":"U kunt ook een variabele in een berichtvenster gebruiken. Laten we zeggen dat je een variabele hebt die","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:\/\/exceladvisor.org\/nl\/variabel-berichtenvenster\/","og_locale":"nl_NL","og_type":"article","og_title":"Hoe gebruik ik een variabele in een berichtenvenster?","og_description":"U kunt ook een variabele in een berichtvenster gebruiken. Laten we zeggen dat je een variabele hebt die","og_url":"https:\/\/exceladvisor.org\/nl\/variabel-berichtenvenster\/","og_site_name":"Excel Advisor","article_modified_time":"2023-12-06T05:48:31+00:00","og_image":[{"url":"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/boite-de-message-variable-vba.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Geschatte leestijd":"1 minuut"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/exceladvisor.org\/nl\/variabel-berichtenvenster\/","url":"https:\/\/exceladvisor.org\/nl\/variabel-berichtenvenster\/","name":"Hoe gebruik ik een variabele in een berichtenvenster?","isPartOf":{"@id":"https:\/\/exceladvisor.org\/nl\/#website"},"primaryImageOfPage":{"@id":"https:\/\/exceladvisor.org\/nl\/variabel-berichtenvenster\/#primaryimage"},"image":{"@id":"https:\/\/exceladvisor.org\/nl\/variabel-berichtenvenster\/#primaryimage"},"thumbnailUrl":"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/boite-de-message-variable-vba.png","datePublished":"2023-09-27T16:13:55+00:00","dateModified":"2023-12-06T05:48:31+00:00","description":"U kunt ook een variabele in een berichtvenster gebruiken. Laten we zeggen dat je een variabele hebt die","breadcrumb":{"@id":"https:\/\/exceladvisor.org\/nl\/variabel-berichtenvenster\/#breadcrumb"},"inLanguage":"nl-NL","potentialAction":[{"@type":"ReadAction","target":["https:\/\/exceladvisor.org\/nl\/variabel-berichtenvenster\/"]}]},{"@type":"ImageObject","inLanguage":"nl-NL","@id":"https:\/\/exceladvisor.org\/nl\/variabel-berichtenvenster\/#primaryimage","url":"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/boite-de-message-variable-vba.png","contentUrl":"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/boite-de-message-variable-vba.png"},{"@type":"BreadcrumbList","@id":"https:\/\/exceladvisor.org\/nl\/variabel-berichtenvenster\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Thuis","item":"https:\/\/exceladvisor.org\/nl\/"},{"@type":"ListItem","position":2,"name":"Hoe gebruik ik een variabele in een berichtenvenster?"}]},{"@type":"WebSite","@id":"https:\/\/exceladvisor.org\/nl\/#website","url":"https:\/\/exceladvisor.org\/nl\/","name":"Excel Advisor","description":"Uw gids voor datadominantie","publisher":{"@id":"https:\/\/exceladvisor.org\/nl\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/exceladvisor.org\/nl\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"nl-NL"},{"@type":"Organization","@id":"https:\/\/exceladvisor.org\/nl\/#organization","name":"Excel Advisor","url":"https:\/\/exceladvisor.org\/nl\/","logo":{"@type":"ImageObject","inLanguage":"nl-NL","@id":"https:\/\/exceladvisor.org\/nl\/#\/schema\/logo\/image\/","url":"https:\/\/exceladvisor.org\/nl\/wp-content\/uploads\/2023\/12\/exceladvisor.org_.png","contentUrl":"https:\/\/exceladvisor.org\/nl\/wp-content\/uploads\/2023\/12\/exceladvisor.org_.png","width":105,"height":36,"caption":"Excel Advisor"},"image":{"@id":"https:\/\/exceladvisor.org\/nl\/#\/schema\/logo\/image\/"}}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/exceladvisor.org\/nl\/wp-json\/wp\/v2\/pages\/2162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/exceladvisor.org\/nl\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/exceladvisor.org\/nl\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/exceladvisor.org\/nl\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/exceladvisor.org\/nl\/wp-json\/wp\/v2\/comments?post=2162"}],"version-history":[{"count":1,"href":"https:\/\/exceladvisor.org\/nl\/wp-json\/wp\/v2\/pages\/2162\/revisions"}],"predecessor-version":[{"id":2538,"href":"https:\/\/exceladvisor.org\/nl\/wp-json\/wp\/v2\/pages\/2162\/revisions\/2538"}],"wp:attachment":[{"href":"https:\/\/exceladvisor.org\/nl\/wp-json\/wp\/v2\/media?parent=2162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}