{"id":279,"date":"2016-07-04T14:15:29","date_gmt":"2016-07-04T18:15:29","guid":{"rendered":"http:\/\/access-diva.com\/blog\/?p=279"},"modified":"2016-07-08T23:49:38","modified_gmt":"2016-07-09T03:49:38","slug":"where-to-copypaste-code","status":"publish","type":"post","link":"https:\/\/access-diva.com\/blog\/?p=279","title":{"rendered":"Where to copy\/paste Code"},"content":{"rendered":"<p>You found a piece of code, it says to copy\/paste into the Event Procedure of your Control, great!\u00a0 Hmm, now where exactly is that?<\/p>\n<p>First, open you <strong>Form<\/strong> in <strong>Design Mode<\/strong> making sure the <strong>Property Sheet<\/strong> is open.\u00a0 Select your Control and on the Property Sheet select the Event tab.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-343 size-full\" src=\"http:\/\/access-diva.com\/blog\/wp-content\/uploads\/2016\/07\/PropertySheet.png\" alt=\"PropertySheet\" width=\"346\" height=\"432\" srcset=\"https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2016\/07\/PropertySheet.png 346w, https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2016\/07\/PropertySheet-240x300.png 240w, https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2016\/07\/PropertySheet-120x150.png 120w\" sizes=\"auto, (max-width: 346px) 100vw, 346px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Go copy the code you want to paste.\u00a0 Then click on the line of the event you want to add the code to, i.e. the On Current.\u00a0 From here you can click the <strong>Ellipse<\/strong> button, the one with the three dots, or you can first select <strong>[Event Procedure]<\/strong> from the drop down and then click the <strong>Ellipse<\/strong> button, pictured below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-344\" src=\"http:\/\/access-diva.com\/blog\/wp-content\/uploads\/2016\/07\/PSEventProcedure.png\" alt=\"PSEventProcedure\" width=\"452\" height=\"302\" srcset=\"https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2016\/07\/PSEventProcedure.png 452w, https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2016\/07\/PSEventProcedure-300x200.png 300w, https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2016\/07\/PSEventProcedure-150x100.png 150w, https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2016\/07\/PSEventProcedure-400x267.png 400w\" sizes=\"auto, (max-width: 452px) 100vw, 452px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Once the <strong>Ellipse<\/strong> button is clicked the <strong>VB Editor<\/strong> will open&#8230;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-345 size-full\" src=\"http:\/\/access-diva.com\/blog\/wp-content\/uploads\/2016\/07\/VBE.png\" alt=\"VBE\" width=\"386\" height=\"297\" srcset=\"https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2016\/07\/VBE.png 386w, https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2016\/07\/VBE-300x231.png 300w, https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2016\/07\/VBE-150x115.png 150w\" sizes=\"auto, (max-width: 386px) 100vw, 386px\" \/><br \/>\nThen paste (Ctrl+V) your code between the <strong>Private Sub<\/strong>&#8230; and <strong>End Sub<\/strong>.\u00a0 To be sure it pasted correctly, at the top from the menu select <strong>Debug<\/strong> then <strong>Compile<\/strong>.\u00a0 If there are any errors you can fix and then save and close (or close and save).<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_279\" class=\"pvc_stats all  \" data-element-id=\"279\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/access-diva.com\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>You found a piece of code, it says to copy\/paste into the Event Procedure of your Control, great! Hmm, now where exactly is that?<\/p>\n<p>First, open you Form in Design Mode making sure the Property Sheet is open. Select your Control and on the Property Sheet select the Event tab.<\/p>\n<\/p>\n<p>&nbsp;<\/p>\n<p>Go copy the [&#8230;]<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_279\" class=\"pvc_stats all  \" data-element-id=\"279\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/access-diva.com\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[85],"class_list":["post-279","post","type-post","status-publish","format-standard","hentry","category-access-tips","tag-vb-editor","odd"],"_links":{"self":[{"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/279","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=279"}],"version-history":[{"count":4,"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/279\/revisions"}],"predecessor-version":[{"id":390,"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/279\/revisions\/390"}],"wp:attachment":[{"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=279"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}