Synchronizing outcomes

Status
Not open for further replies.

toddswint1

New Member
Joined
Jan 31, 2014
Messages
8
Hello,

I am building a tool to dynamically and graphically illustrate a guitar scale on a guitar fretboard.

I am trying to achieve the following: On worksheet change event, 1) show image and play sound SIMULTANEOUSLY, and 2) pause for a predefined number of seconds before executing next procedure.

When I run the code below, I hear the tone immediately but the image display is delayed.

How can this rudimentary code be modified to achieve the objective? Your help is much appreciated! Todd



‘ Public Declare PtrSafe Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" _
‘ (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


‘ Sub Speed_Crawl()
' Pause for Crawl selection
‘ Application.Wait (Now + TimeValue("00:00:4"))
‘ End Sub


‘ Sub PLAY_PASS_1_HIGH_E_Fret1()
'
‘ Dim MyPath As String
‘ MyPath = Application.ActiveWorkbook.Path


' LOW E/FRET 1
' MARKER FINGER - NULL
‘ If Range("G259").Value = "" Then
‘ ActiveSheet.Shapes("Dot_LowE1_Finger_Pinky").Visible = False
‘ ActiveSheet.Shapes("Dot_LowE1_Finger_Index").Visible = False
‘ ActiveSheet.Shapes("Dot_LowE1_Finger_Ring").Visible = False
‘ ActiveSheet.Shapes("Dot_LowE1_Finger_Middle").Visible = False
‘ End If
' MARKER FINGER - PINKY
‘ If Range("G259").Value = "P" Then
‘ ActiveSheet.Shapes("Dot_LowE1_Finger_Pinky").Visible = True
‘ ActiveSheet.Shapes("Dot_LowE1_Finger_Index").Visible = False
‘ ActiveSheet.Shapes("Dot_LowE1_Finger_Ring").Visible = False
‘ ActiveSheet.Shapes("Dot_LowE1_Finger_Middle").Visible = False
‘ End If
' MARKER FINGER - INDEX
‘ If Range("G259").Value = "I" Then
‘ ActiveSheet.Shapes("Dot_LowE1_Finger_Pinky").Visible = False
‘ ActiveSheet.Shapes("Dot_LowE1_Finger_Index").Visible = True
‘ ActiveSheet.Shapes("Dot_LowE1_Finger_Ring").Visible = False
‘ ActiveSheet.Shapes("Dot_LowE1_Finger_Middle").Visible = False
‘ End If
' MARKER FINGER - RING
‘ If Range("G259").Value = "R" Then
‘ ActiveSheet.Shapes("Dot_LowE1_Finger_Pinky").Visible = False
‘ ActiveSheet.Shapes("Dot_LowE1_Finger_Index").Visible = False
‘ ActiveSheet.Shapes("Dot_LowE1_Finger_Ring").Visible = True
‘ ActiveSheet.Shapes("Dot_LowE1_Finger_Middle").Visible = False
‘ End If
' MARKER FINGER - MIDDLE
‘ If Range("G259").Value = "M" Then
‘ ActiveSheet.Shapes("Dot_LowE1_Finger_Pinky").Visible = False
‘ ActiveSheet.Shapes("Dot_LowE1_Finger_Index").Visible = False
‘ ActiveSheet.Shapes("Dot_LowE1_Finger_Ring").Visible = False
‘ ActiveSheet.Shapes("Dot_LowE1_Finger_Middle").Visible = True
‘ End If

' PLAY TONE
' Determine Clean or Heavy Tone
‘ If Range("S69").Value = "CLN" And Range("G259").Value <> "" Then
‘ Application.Run "SoundFile_High_E"
‘ End If
‘ If Range("S69").Value = "HVY" And Range("G259").Value <> "" Then
‘ Application.Run "SoundFile_High_E"
‘ End If
‘ DELAY NEXT PROCEDURE
‘ Call Speed_Crawl


‘ End Sub
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Duplicate https://www.mrexcel.com/forum/excel-questions/1088109-synchronizing-outcomes.html#post5229391

Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread.
Per forum rules, posts of a duplicate nature will be locked or deleted (rule 12 here: Forum Rules).

Note that sometimes posts from new users require Moderator approval before you can see them on the public forums. When this happens, you should see a message to that effect when you try to post it.
Please be patient and do not attempt to post the question again.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top