Play Sound Every X Seconds
Oct 17, 2007
I would like to create a macro that plays a sound every 45 seconds or so. In other words, I would like to have a countdown timer that counts from 45 seconds down to 0 seconds and at the end it plays a sound file(could be mp3, wav, etc) to signal the end. After that it should automatically reset itself back to the start of 45s and count down again. This would be repeated about ten to eleven times. What is the easiest way of doing this? It's too confusing. Lets say the audio file was located in: C:my soundseep.wav
View 2 Replies
ADVERTISEMENT
Oct 16, 2008
This is what I have,
Private Declare Function PlaySound Lib "winmm.dll" _
Alias "PlaySoundA" (ByVal lpszName As String, _
ByVal hModule As Long, ByVal dwFlags As Long) As Long
Const SND_SYNC = &H0
Const SND_ASYNC = &H1
Const SND_FILENAME = &H20000
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If UCase(ActiveSheet.Range("S41").Value) > 99 Then
FName = "C:windowsmediading.wav"
Call PlaySound(FName, 0&, SND_ASYNC Or SND_FILENAME)
End If
End Sub
but I cant get it to work!
All I want is for it to play a sound when My Value in S41 goes over the Value 99
the value is part of a simple formula of sums.
View 9 Replies
View Related
Jul 13, 2013
Just want to know if there is a way to play a sound based on the value of a cell. In this case, if the cell says "S" then the sound is a low note and if the cell says "L" then the sound is a high note. If the cell is "" then there is no sound.
View 1 Replies
View Related
Jun 25, 2009
I am trying to make a sound play in excel. I have the following code in an excel spreadsheet on my computer at home. When I do the same code on my computer at work, the sound will not play.
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("joe").Value > 100 Then
For x = 1 To 3
Beep
Next x
End If
End Sub
Any thoughts as to what the problem is?
View 7 Replies
View Related
Dec 11, 2007
I have 2 cells that take imported info. from a DDE server. Lets say one cell currently has a number of 9.00. Lets say the 2nd cell has a number of 1.00. Lets say the 1st cell over time goes from 9.00 to 8.50 to 7.33 to 6.67 and so on....it continues to go down. At the same time, lets say the 2nd cell is gaining and going from 1.00 to 1.33 to 2.00 to 2.67 to 3.33, and so on...and it continues to go up. I want to have a certain sound play once the two cell numbers "cross" each other. I only want this sound to play one time and not every "tick" as they cross and go up/down. Can someone show me how to program this?
View 14 Replies
View Related
Dec 20, 2008
I'm trying to automate/keep records of my day by setting up a spreadsheet which : 1) Plays a wav music file at a schedule time as a reminder and 2) at the same time calls up a form where I can enter the results of the activity then 3) saves the results to a sheet where consecutive daily records can be recorded and graphed.
Example
At 5am each day I want a "Motivation.wav" music file to open and play and a form appear where I enter in the number of sit ups, push-ups I get done, which I enter in the form and it gets saved to a sheet where I can graph my progress based on the results recorded.
View 12 Replies
View Related
Oct 22, 2007
Is there any way of playing a sound (or even better, speech) whenever a specific cell equals a certain value or contains a certain string (such as "Alarm")? This has to happen automatically as the cell updates and require no interaction.
View 3 Replies
View Related
Nov 24, 2009
I have a wav sound I would like the user to hear when the cell is selected
Each cell has a word in it:
a1 = relator
a2 = woo
a3 = strategic
each word has a related recording that is in the form of a wav sound file. (does the wav filke have to be stored in a certain place...?) perused lots of Qs & As but didn't find one this simple: the user clicks the cell and the sound plays.
View 3 Replies
View Related
May 21, 2008
This is a complete mystery to me. I have some code (reproduced below) that plays a .wav file when any of the values in a1:a9 changes from 0 to greater than 0. This code works when I manually change one of the values to a trigger number in any of the cells.
The problem is that the values in a1:a9 are really pointers to other cells. For example,
a1 is "=sum(D9:D20)"
So, when I d9:d20 chnages values such that a1 changes from 0 to 5, the sound doesn't play. To put it simply, if I type "5" in a1 the sound plays. If a1 = D1 and I type "5" in D1 the value in A1 changes to 5 but the sound doesn't play.
How do I modify this code such that any change in the value of A1:A9, no matter the source of that data change, triggers the playing of the sound? ......
View 6 Replies
View Related
Feb 5, 2010
What I want to achieve is for say if the value in cell A1 equals the value in cell B1, then cell A1 to flash a background colour (eg. red), and also play a sound. I assume this can only be achieved using VBA, of which I am not conversant with. I am searching the forum for answers, but not yet found one that addresses my problem exactly (being a complete VBA newbie). In the meantime if some could assist please or point me to a thread that addresses this query.
View 9 Replies
View Related
Jan 5, 2003
I'm using this simple code to play a wav file I loaded into a worksheet:
ActiveSheet.Shapes("Object 1").Select
Selection.Verb Verb = xlclose
I attached the macro to a button and it works. Now I need to stop the wave sound playing, by attaching another macro to a button. Is that possible? What syntax shall I use to stop playing the sound?
View 5 Replies
View Related
Sep 14, 2013
I'm using this simple code to play a wav file I loaded into a worksheet:
ActiveSheet.Shapes("Object 1").Select
Selection.Verb Verb = xlclose
I attached the macro to a button and it works. Now I need to stop the wave sound playing, by attaching another macro to a button. Is that possible? What syntax shall I use to stop playing the sound?
View 3 Replies
View Related
Jan 20, 2010
embed a audio file (.wav or .mp3) into a Excel Sheet and be able to have it play from a macro? I need the Clip to stay in the file not refer to a location on the pc and have it play from the sheet not open media player. Can this be done?
View 7 Replies
View Related
Jan 18, 2010
I want to change 1 minute 24 seconds and 5 tenths into a seconds number. So basically it would come out as 84.50 seconds.
View 4 Replies
View Related
Sep 23, 2007
How can I Convert Decimal Minutes & Seconds To Total Seconds?
Here is the sample
View 4 Replies
View Related
Jun 28, 2008
I trying to figure a formula to convert time on a phone call eg. 01:01:21 into total seconds (3661). Phonecalls will never be more than an hour long but the spreadsheet I will be supplied with (havn't got it yet!) will display them in the 00:00:00 format.
View 5 Replies
View Related
Jun 18, 2008
Is there an easy way of converting seconds from using a time into hours, minutes, seconds
View 9 Replies
View Related
Jun 21, 2009
How would I go about converting - for example:
0:22 (formated general) to a number = 22
or
1:30 (formated general) to a number = 90
View 9 Replies
View Related
Jul 13, 2006
I am trying to convert a number of "hours" "minutes" and "seconds", to give me a result in seconds only, in order that I may then financially cost the amount of time spent on a task. (A time and motion costing exercise)
Example:
1119:48:06
Represents 1119hours:48minutes:36seconds spent on a task.
I can manually convert this to 4031286 seconds, but it just takes too much time !!!(sorry!)
The data is extracted from a database which is unable to split the hours,minutes,seconds into seperate fields, which prevents me from using three cells in excel.
View 9 Replies
View Related
Dec 7, 2007
I have a spreadsheet that imports data relating to phone call durations. The information imports as a total number of seconds taken.
What I need to do is to change that number of seconds into hours, minutes and seconds.
Changing the format of the cells doesn't work.
I've tried everything I can think of, and run out of ideas.
example:
23 needs changing to 00:00:23
96 needs changing to 00:01:36
268 to 00:04:28
9374 to 02:35:14
View 7 Replies
View Related
Jan 29, 2013
I have been trying for the last two weeks to convert a list of seconds into minutes and seconds, but just can not do it?
Below is an example of my raw data, that I need to convert into minutes and seconds:
120000
120000
120000
2880000
480000
[code].....
View 5 Replies
View Related
Feb 25, 2009
is it possible to play dos games through excel? i want to somehow play my old championship manager games in excel whist at work (i don't actually want to work!!)
View 4 Replies
View Related
Mar 26, 2014
How do I get my spreadsheet to play wav files I have saved according to certain criteria?
i.e. if certain value is entered into the cell, or on opening of the spreadsheet
I have message boxes appearing for the values in certain cells, however, don't know how I would add in the playing of a wav file to enhance this.
View 3 Replies
View Related
Oct 4, 2007
I have the following data in excel (just an example):
X | Y1 | Y2
-3 | 9 | 1
-2 | 4 |
-1 | 1 | 1.5
0 | 0 |
1 | 1 | 1.5
2 | 4 |
3 | 9 | 1
I want to play Y1 and Y2 against X. Y2 does not appear on the chart because it's not continuous. I would like to plot Y1 (as a continuous graph) and a Y2 as dots (or scattered as excel lables it).
View 4 Replies
View Related
Feb 19, 2014
I have built a darts scoreboard on Excel 2007, to track scores but also record statistics such as 3 dart average and -checkout success. As I don't know how to write macro's I've created it using formulae only - it's not fancy but does the job!
I have a number of .WAV files that call out the main scores - 60, 100, 140 and 180 and I'd like the scoreboard to play the relevant file when someone scores that amount. I've trawled through lots of forums but have been able to find one that does exactly what I need it to, and I don't know how to adjust the ones I've found.
This is how the scoreboard works:
There are 25 different sheets, one for each leg of the match that could be played. The sheets are named Leg1, Leg2, Leg3 etc.On each sheet, Player 1's scores are entered in cells J15 to J47, and Player 2's scores are entered into cells O15 to O47Once Player 1 or Player 2 wins the leg, I move on to the next sheet to play the next leg. All the scores entered remain in each sheet until the match has ended
This is what I need the macro to do:
When a score of anything other than 60, 100, 140 or 180 is entered, do nothingWhen a score of 60, 100, 140 or 180 is entered, play the relevant .WAV fileIf, for example, Player 1 scores 60 the '60' .WAV file plays. 60 will be left in J15, then Player 2 may score 100, which will be entered into O15 and should trigger the '100' .WAV file.Note that either Player 1 or Player 2 can start the leg, so the order scores are entered between column J and column O can differ.
View 6 Replies
View Related
Aug 25, 2007
I have a list of 10 of my favorite/lucky numbers that I want to play in the lottery. The lottery picks 5 numbers total. I need a way to show me all the possible combinations of my 10 numbers picked in a 5 number draw (hope that makes sense). There are no repeat combinations- for example- I DO NOT WANT 1-2-3-4-5 and 5-4-3-2-1 to come up as separate combinations- so each of my favorite #s needs to be used only once in each combination, and each set used once.
I have searched this board for 2 hours now- read tons of other posts, but not finding a real solution. The output will be a list of all the possible combinations (no repeats, and no permutations) using my 10 favorite numbers. Another example-
1-2-3-4-5
1-2-3-4-6
1-2-3-4-7
1-2-3-4-8
1-2-3-4-9
1-2-3-5-6
1-2-3-5-7
and so on.
How do I create this? I realize the resulting table will be quite a large number of combinations- but we're going to have fun with it and pick a few at random.
View 9 Replies
View Related
Apr 6, 2007
I'm trying to write some VB code that will call up a sound file each time I give a new cell focus.
Example:
Cell A1 holds value "Hello"
I'm trying to write code that calls a sound clip I've recorded that says "Hello" when I select A1
Any suggestions?
View 7 Replies
View Related
Feb 26, 2008
How can I silence the annoying beep heard whenever a msgbox pops up or an error box appears?
View 9 Replies
View Related
Oct 20, 2004
is there anyway of playing a sound once a user opens my excel file???
View 3 Replies
View Related
Aug 24, 2006
I have made a standard Demo Workbook for testing Wav file VBA in this case.
It shows the problem code and a series of counters.
When the RED macro button is pressed, it should show the error code. and below a brief explanation.
I don't think it is an actual error as such, but I ask for an alteration. Once the code is solved, the GREEN button should work. If the demo book is downloaded it will explain better.
View 7 Replies
View Related