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


ADVERTISEMENT

Excel 2007 :: Macro To Play Different WAV Files Depending On Value Of Certain Cells

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

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

.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

Plotting Question - Play Y1 And Y2 Against X

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

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

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

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

Checking Multiple Files For Criteria, Via VBA

Mar 26, 2008

I have 52 weekly folders which are contained in the following directory

G:RawProduct ManagementJen DelaneyVendor ReportsLexmarkWeekly Stock And Sales2007

Wk4
Wk5
Wk6

Etc. etc.

Each (EG) Wk4 folder contains 6 files (all .xls format)

What I need to do (quickly) is create a macro which will cycle through each file & tell me which file (filename) contains the following part numbers (if at all)

0012A7610
0064080HW
0012A0150
0012A5140
0012A7610
0064080HW

So basically its checking to see if any of the above part numbers are contained in the file?

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

Combination- List Of 10 Of My Favorite/lucky Numbers That I Want To Play In The Lottery

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

VBA Macro To Loop Through Folders And Select Files With Certain Criteria

Feb 6, 2014

I'm looking to create a macro that does the following:

- Loops through a folder structure
- Opens a specific subfolder within each folder based on name (i.e. "*Financials*")
- Opens a specific file within that subfolder "*Financials*" based on both most recently modified a naming criteria (i.e. "*Model*")
- Performs an action on that file (a macro created elsewhere that I assume I can call here)
- Closes that file, and moves on to the next file matching the criteria above

As a self-diagnosed VBA novice, I'm having trouble adapting code found in various forums for my specific project.

I've found examples that address aspects of my desired macro or do similar things, but I can't figure out how to put them together.

Open most recent file:

[Code] .....

Loop through folders and subfolders and print all files:

[Code] ....

View 1 Replies View Related

Macro To Select Multiple Files And Copy Them Based On Criteria?

Mar 10, 2013

This is what I am trying to achieve:

1) Prompt user to select a file (or multiple files)

2) Copy the files that meet certain criteria to a folder

My attempt (fail):
VB:

Sub FILES2SFTP() Dim FileNames As Variant Dim I As Integer Dim fso As Variant Dim Data As String ChDrive "G:" ChDir "G:TEST" Data = InputBox("Enter the date", "Enter the date", Format(Application.WorksheetFunction.WorkDay(Date, -1), "yyyymmdd")) Set fso = [code]....
I get error 424 object not found in this line:

If fso.getfilename(FileNames(I).Name) = ("Name1" & Data & ".xls" Or "Name2" & Data & ".xls") Then

View 3 Replies View Related

Macro That Prompts To Chose Files And Copies Them Based On Criteria - Error 424 / Object Required

Mar 6, 2013

I have written a macro that prompts the user to chose some files and if they meet certain criteria, it copies them to a specified folder.However, I have run into this 424 error "Object required".

Code:
Sub FILES2SFTP()
Dim FileNames As Variant
Dim I As Integer
Dim fso As Variant
Dim Data As String
ChDrive "G:"
ChDir "G:TEST"

[code]....

The error is in this line:

If fso.getfilename(FileNames(I).Name) = ("Name1" & Data & ".xls" Or "Name2" & Data & ".xls") Then

View 2 Replies View Related

Send Multiple Files Based On Criteria To Multiple Email Addresses?

Jun 29, 2014

I have a directory which contains many files, they are all names based on their locations. eg. Burwood-File1.xls,Burwood-File2.xls,Burwood-File3.xls etc

I have a master that which will contain the branch in the first column.

I have defined the directory location in a separate sheet as well as email template.

When I click on the Send Email button I want ti to attach the files that match the Branch name.

The Branch list will constantly grow.

View 2 Replies View Related

VBA - Carry Out Task On Set Of CSV Files - Return Values And Leave Files Untouched?

May 14, 2013

Trying to write a script to carry out a number of tasks but is there code to enable an Excel to look in a particular file for the list of csv files - carry out the tasks and return the appropriate values in the Excel sheet whilst leaving the original csv files untouched?

View 2 Replies View Related

Transfering Files From Lots Of Files To One Single Exel Master File.

Jun 26, 2009

Need a way to update a single master file. What happens right now is that the cost manager sends out one file to a lot of different project heads and then on having them return back to him he basically has to individually add in all the data. What i am trying to do is that he somehow carries on sending out the data as there are a lottt of projects and then on returning them they automatically update.

View 14 Replies View Related

Copy And Rename Files In VBA By Searching Multiple Folders For Files?

Jan 4, 2014

how I can loop through folders to select files starting with a certain word and copy all of them to a different folder and rename them. The folder structure is given below

Company 1(parent folder)
North South East(sub folder) West(sub folder)
Jan Feb Mar.... Dec Jan Feb Mar.... Dec Jan Feb Mar.... Dec Jan Feb Mar.... Dec

In the above structure, the files are present inside each folders Jan, feb...Dec under the regions North, South East n west. note that I have to select files starting with "Sales" and copy them into a new folder(say results) and rename copied files as Sales1.xls, Sales2.xls etc. (Files are not present in the folder company1, north, south, east and east.)

View 1 Replies View Related

Open Files In Folder- Wait 30 Seconds Then Close The Files

Jul 5, 2007

I want to allow users to place files (.jpg, .tif, .pdf, .pps etc) into a network folder and then have my program open each file and display it for 30 seconds then close the file and the application before opening the next file.

1. Set up a loop to get a directory listing of the folder and write the listing to a text file.

2. Open up the text file and get the next filename in it

3. Open the file in the associated application

4. Wait for 30 seconds (or some period of time) and then close the file

5. Repeat steps 2-4

DoIt = 1
While DoIt = 1
Open "C:TempList.txt" for output as #1
Print #1, Files In Folder
Close #1

Open "C:TempList.txt" for input as #2
while not eof(2)
Line input #2, MyFile
Display MyFile on screen
Wait for 30 seconds
Close MyFile and MyApplication that opened it
wend
Close #2

I can get the directory listing just fine with no problems

I can open the files in the associated application just fine with no problems.

with closing the application after 30 seconds or some period of time.

I need some code that will allow me to easily send it a filename and it will know how to close the file and the application that opened it.

View 9 Replies View Related

Files Saved To Program Files Folder, Open As Read Only

Feb 8, 2009

I have an Excel application (Excel 2003) which is stored in the default Program Files folder by the Installer; for example: c:program fileszxchello.xls. The problem I am running into is this file opens as Read Only in Vista and this is interfering with the running of the application. There is no problem opening the file normally in Windows XP.

I have been able to narrow down the cause of this to the User Account Control system in Vista - if I turn OFF User Account Control, the Excel file opens normally and my application functions normally. Is there another option to open the Excel file without turning OFF User Account Control because some users may find it unacceptable to turn OFF this security feature. Ofcourse, one option is to install the application in another location, outside the Program Folder, and the file would open normally, but the Packaging Wizard that I am using to package the application does not allow me to install the application in any other location and thus, the application installs in the Program Folder and I am running into this problem of the Exel file opening as Read Only. Is there a way out of this situation where I can open the file normally (not as Read Only)?

View 5 Replies View Related

Add Another Worksheet & Continue Importing The Html Files Until There Are No More Files To Import

Jul 13, 2006

I'm using the following code to import thousands of html files into my spreadsheet. The code is working fine. Since I am importing thousands of files, when there is no more space on my worksheet, the code stops with an error message. I want to make this code add another worksheet & continue importing the html files until there are no more files to import.

Sub Master_Importer()
Dim I As Long
Dim strFilename As String
Dim strPath As String
strPath = "file:///C:/Documents and Settings/c/Desktop/New Folder/"
With Application.FileSearch
.LookIn = "C:Documents and SettingscDesktopNew Folder"
.FileType = msoFileTypeAllFiles
.Execute
For I = 1 To .FoundFiles.Count
strFilename = Mid(.FoundFiles(I), InStrRev(.FoundFiles(I), "") + 1)
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;" & strPath & strFilename _ .......................

View 5 Replies View Related

Save Ranges In Multiple Files To Text Files

Dec 21, 2007

I have a excel file that I enter information into. I have code that saves the files to a certain folder with the name, date, and time stamp for the file name. At the end of the day I might have 3 to 15 excel files I have created that day and I would like to take information from certain cells (examle: L3, B6, B7, B8, G8, and so on) and create a txt file with all of the information in it.

Example:
12/20/2007
Your Name
123 Somewhere St.
Here, OH 45111
Home Visit

12/20/2007
Someone Else
345 Anywhere St.
There, OH 45211
Hospital Visit

View 9 Replies View Related







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