• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Adding Sound To Number Animation

Raymond Ramirez

New Member
Hello,
I am using Circular Referencing with Iterative Calculations to animate the sum in a column, in an .xlsm worksheet (the calculation is by regular formula, not vba). How can I add a sound file to run concurrently with the iterations, without interference? I tried using PlaySoundA "SoundMe" .wav file, but it stops the number animation effect and just shows the calculated result.
I would like to hear the sound playing at the same I see the number incrementing during iterations.
I sincerely appreciate any help.
 
Hard to say without seeing your actual set up. I'd recommend uploading simplified version of your file, that still replicates your issue. Making sure to include your current attempt. So it will be easier for us to pinpoint your issue.

I'm not expert in this area, as I hate adding fluff piece to Excel procedure/process...
But try having separate sub that starts playing sound. With optional argument to stop the sound.

Check following link.
https://www.mrexcel.com/board/threads/play-a-wave-sound-then-stop-playing-it.33496/
 
Wow thanks so much for replying so soon.
Attached is my file.
The cells with the circular references are D8, H8, and L8.
They reference cells
R36, S36, and T36.
If I type the formula =If(H8<>"",SoundMeDR(),"") , in cell H15, for instance, the sound executes, but prevents the "count up" or "rolling" effect in cell H8 from happening, and the result just appears at the end of the sound file. I would like sound effect to start at the same time as the number animation and to last as long as the calculation is executing. Thanks.
 

Attachments

  • TESTER 3 PLR 8-3-20 2020.xlsm
    98.4 KB · Views: 2
Ah, you can't do this using UDF. i.e. using it in cell formula.

It must be called in subroutine to co-exist with process that updates cell value.

With your current set up... only way I can think is to call sub routine via Worksheet_Calculate event...

However, this will play the sound no matter what part of worksheet is re-calculated.
 
Ah, you can't do this using UDF. i.e. using it in cell formula.

It must be called in subroutine to co-exist with process that updates cell value.

With your current set up... only way I can think is to call sub routine via Worksheet_Calculate event...

However, this will play the sound no matter what part of worksheet is re-calculated.

Thanks so much. I really don't know much vba, but I would like to give it a shot. Is there a way in vba to recalculate only selected cells, instead of using Worksheet_Calculate?
What would that look like? If not possible,
No worries, I thank you very much for your time and effort.
 
Back
Top