{"id":9539,"date":"2021-12-01T17:16:10","date_gmt":"2021-12-01T17:16:10","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=9539"},"modified":"2021-12-01T17:17:09","modified_gmt":"2021-12-01T17:17:09","slug":"vba-excel-loop-a-sound","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/office\/vba-excel-loop-a-sound\/13342.html","title":{"rendered":"VBA Excel Loop A Sound?"},"content":{"rendered":"<p>I am currently using the following code to play a Wav file, but i want to make it loop.<\/p>\n<p>&nbsp;<\/p>\n<p>Option Explicit<br \/>\nPrivate Declare Function sndPlaySound32 Lib &#8220;WINMM.DLL&#8221; _<br \/>\nAlias &#8220;sndPlaySoundA&#8221; (ByVal lpszSoundName _<br \/>\nAs String, ByVal uFlags As Long) As Long<\/p>\n<p>&nbsp;<\/p>\n<p>Sub PlaySong(ByVal Play As Boolean)<br \/>\nIf Play = True Then<br \/>\nCall sndPlaySound32(&#8220;C:\\Documents and Settings\\Owner\\Desktop\\spelunk.wav&#8221;, 1)<br \/>\nElse<br \/>\nCall sndPlaySound32(&#8220;C:\\Documents and Settings\\Owner\\Desktop\\spelunk.wav&#8221;, 0)<br \/>\nEnd If<br \/>\nEnd Sub<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":1},"question-category":[53],"question_tags":[],"class_list":["post-9539","question","type-question","status-publish","hentry","question-category-office"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/9539","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=9539"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=9539"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=9539"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=9539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}