Thanks Spectre....I’ve seen this and a few others out there. I have yet to take these basic instructions and build a more complex spreadsheet. I tried this specific example to beep when for example, last size > 1000 on a set of streaming quotes and the results were hit or miss.
Try immediately surrounding (before, after, or both) your sound generating statement with: Code: Application.Wait (Now + TimeValue("0:00:01")) and/or Code: DoEvents If a one-second delay is too long (re: the timevalue delay function above), only use doevents. You may also loop the doevents (or use multiple statements) to increase the delay in small increments.
Thanks for the input! I’ll try “DoEvents” and see if that does what I want. Def want sub 1 second... I am currently trying to monitor multiple streaming time and sales and play sounds based on “last size.”
Also try application.wait for sh*ts and giggles ... and for proof of concept. You can remove it later. Doing that may give you some idea of how many doevents you might need. FYI ... had the same problem. Seems VBA ran "so fast" on my puter that the sound was never generated ... until I slowed it down. I have four beeps statements, each followed by a one-second delay AND a doevents to signal the end of a program. I usually only hear the last three. Sometimes I hear half of the first beep. Keep us posted! EDIT: I've never tried it, but it looks like application.wait also works for delays of less than one second. https://stackoverflow.com/questions...me-delay-of-less-than-one-second-in-excel-vba