Play Wave Sound Then Stop Playing It

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


ADVERTISEMENT

Play Wave Sound Then Stop Playing It?

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

Playing Sound??

Oct 20, 2004

is there anyway of playing a sound once a user opens my excel file???

View 3 Replies View Related

Playing A Sound On Cell Value

Dec 20, 2008

I have an automated sort descend happening all day. The top several cells are coloured green and if a cell jumps to the top from below the green cells, I would love a warning sound. Is is possible to activate a sound if a cell changes from a colour to a non colour. Preferably if any of the cells within a range of say F2: F6 changes from green to a non colour.

If it is not possible to have a change of colour to activate the macro, I could get around it by - if any cells in a range of H2:H5 >than 1 it plays a sound.

View 9 Replies View Related

.wav For Vb (play Sound When My Value Goes Over...)

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

Play Sound When Cell Contains Certain Value?

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

Beep Sound Will Not Play

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

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 View Related

Play A Sound When Cell Condition Is Met

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

Play Sound File At Set Time Each Day

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

Play A Sound When A Cell Equals A Certain Value

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

Play Wav Sound When Cell Is Selected

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

Why Doesn't The Sound Play When The Value Changes Indirectly?

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

Cell To Flash And Play A Sound

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

Playing Audio Sound As Alert In Cell Triggered By Clock

May 7, 2013

I have a date base that is used as a job status board developed in excel that has locations, times, clock and other areas. What I am looking for is a way of playing a sound when the time approaches 5 min before the time in the excel cell that has been entered into the job status board...

View 3 Replies View Related

Need To Embed A Sound File & Create A Macro To Play It..

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

Stop Mesage Box Sound

Aug 10, 2006

is there a way to remove the plonk sound when a error or message box opens?

View 7 Replies View Related

Find Average Of Different Wave Lengths

Aug 14, 2013

I have attached an excel file. What I would like to find is the average of column D (number) with respect to column A (Genotype ) and also different wave length (Column C). i.e.:

Genotype 1 to its corresponding value in column D for wave length 450
Genotype 1 to its corresponding value in column D and for Wave length 470 to and so on.

Attached File : test2.xlsx‎

View 6 Replies View Related

Identify Max And Min Peaks Of Sine Wave

Dec 2, 2013

I have raw data from a cyclic test that needs to be refined to generate a simple trend.

The raw data has about 1000 points to each complete cycle and im only interested in the maximum and minium values of the peaks. This would be easy but I am typically dealing with 15 cycles a second and in some instances up to 5,000,000 cycles in one test.

The amount of data is too large to be completed in one file but if done in parts I can then use a formula to reduce the number of max and min peaks chosen i.e. 1 in 100.

View 8 Replies View Related

Calculate Wave Time Cycle

Sep 24, 2007

how to calculate in data serie cyles the:

- Mean Amplitude

- The Time (minutes) cycle between Maximum and Minimum cycle values (If the Cycle value X Amplitude)

- Cycle Mean Time.

View 9 Replies View Related

Excel Sine Wave Graph/function Making

Feb 15, 2010

i have some numbers as data, i want to find the function that generate thiese numbers and also i want to view the chart of it, its kind of sine wave graph.

View 9 Replies View Related

Playing 2 Sounds One After The Other

Apr 14, 2014

I have the following sub for me to play sound files:

[Code] .....

Essentially what i want to do is play one sound file, then immediately play another. I am using two subs so that can be achieved as when I was using one sub the first sound didn't play as it was immediately replaced by the second sound.

The lines of code where I call my sounds are:

[Code] .....

I thought the addition of:

[Code] .....

Would allow the first sound to play, before then playing the second sound, however this doesn't seem to be the case and the second sound doesn't play at all.

View 8 Replies View Related

Playing .Wav File

Jan 28, 2010

i have a sheet where there are 2 columns of tick boxes for good/bad input. ive been able to borrow some code that saves the sheet at a date name and based on the fact that if there is one bad tick in the bad column i would like a wav file to play showing this. likewise if there are no bad ticks then a good wav file is played instead. here is my lame code that calls to modules with the actual wav play instrucions in them, named playsound1 and playsound2 :-

Private Sub worksheet_calculate()
If [A22] > 10 Then
MsgBox "Vehicle Log Saved"
Call SaveAsTodaysDate
'End If
'if =sum[d6:d16] > 1 call soundplay1 else call soundplay2
'If Range("d6:d16").Value > 1 Then
'MsgBox "your gonna crash!"
'Call SoundPlay1 Else Call SoundPlay2
End If
End Sub

View 9 Replies View Related

Playing With Autofilters

Jun 2, 2006

I am trying to figure out if it is possible to retrive the list of filter criteria in each filter of the filters collection using VBA. I could trawl through the data and retrive a unique list but I think it would take longer than if I could use what is already there.

I intend to use the list in a combo box elsewhere in the workbook......it's all to stop inquisitive little users accidently changing data and whining that thier figures are misteriously wrong.....

View 5 Replies View Related

Value Formats Not Playing Well Together In If Statement

Apr 29, 2012

I have a formula which lookups the sunset for a particular date.

Code:
sunset = WorksheetFunction.VLookup(tempws.Range("A9"), sun, 2, False
It returns a value in numeric format (eg. .8493055555555556).

I then compare it to a time vale in one of my userform textboxes.

Code:
If rental_end.Value > sunset Then
rental_end.value ="5:00 pm"

I have a suspicion that the tow different formats cannot provide accurate results in the If statement, and causing the result of the If statement to always be true, even when it should be false.

If this is indeed the case, how would one go about adjusting this code to provide proper comparison in the If statement?

View 3 Replies View Related

Excel 2003 :: Playing MP3 From Sub Procedure?

Oct 17, 2012

I am running Excel 2003, and have already searched the forum for "MP3" without avail.

Is there a way to play a MP3 file from a Sub Procedure?

J-Walk provides a way to do it with .wav and .mid files here Excel Developer Tip: Playing Sound From Excel using functions from the "winmm.dll" library.

However, .wav files are very large and I have a sizable collection of sounds which I'd like to use. If possible I'd much prefer to use .mp3 than .wav . Is there a way to do this? Preferably without Window's Media Player popping up.

View 3 Replies View Related

Playing Audible Alarm If Condition Becomes True?

May 12, 2014

Can excel be made to play an alarm if a condition becomes true?

View 5 Replies View Related

Play DOS Games

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

Excel 2013 :: Playing WAV File Based On Cell Value Change

Aug 6, 2014

I have a spreadsheet with a database query attached (refreshing every 60 seconds) showing a stock summary by product.

I need the spreadsheet to play a .WAV file when values change. i.e.;

If cell A1 <6, play sound1.wav
If cell A2 <6, play sound1.wav
If cell A3 <6, play sound2.wav
If cell A4 <6, play sound2.wav

This may need to be repeated several times based on certain criteria. I have a total of about 30 cells which I need to be looked at individually (not a sum of) and to play the relevant sound.

I have seen different people try to tackle this in different ways. The ideal way would be creating alarms in VBA and triggering them using a formula, but I cannot get these to work in Excel 2010 or 2013.

View 6 Replies View Related

Play WAV Files According To Criteria

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







Copyrights 2005-15 www.BigResource.com, All rights reserved