I want a .wav file to be played on change in A column.
Anyone having a vb code please help me.
Thanking
I want a .wav file to be played on change in A column.
Anyone having a vb code please help me.
Thanking
Go to the VBA Editor, double click the sheet name you want to insert the code to...and paste the following code in the editor.
You can check the following link too if you wantPlease Login or Register to view this content.
http://groups.google.com/group/micro...2b0c91b13a1fe1
Good morning
...and welcome to the forum!!
Or alternatively, you could use this which is very similar to vikasbhandari's solution except it doesn't utilise Windows Media Player to play the file.
HTHPlease Login or Register to view this content.
DominicB
Please familiarise yourself with the rules before posting. You can find them here.
Thank for the help.
The .wav file does not work if there is a formula in the column.
Can you please help again
Hi dpbhatt
Who's solution doesn't work?
What do you mean by "doesn't work"? Both solutions rely on the Worksheet_Change event which is activated when a cell is changed, irrespective of whether the cell contains a formula or not.
Is an error message generated?
Can you supply an example workbook that demonstrates this?
DominicB
Whenever a Cell is changed due to formula, The wave file does not get activated. There is sound only on the entry in the column. But if the cell in that column changes due to a formula, Then there is no Sound. There is no error also.
Hi dpbhatt
This is the general nature of the Worksheet_Change event - you wanted a sound playing only if column 1 changed, but a formula refreshing doesn't count as the worksheet changing.
How big is your worksheet? You could try this routine - it's not very pretty but it seems to work. At the moment it only works on the first 5,000 rows, if your worksheet is bigger than this you may want to reconsider your options as this could slow your workbook down. Put it an and report back how you go :
HTHPlease Login or Register to view this content.
DominicB
This is working perfectly, Thanks a Lot, God Bless you.
Hi,
I had been using the code, but i want to have a sound if there is a change only in Column X and Column AA. Pleas help me.
Thank You,
Dpbhatt
Hi dpbhatt
Try this modification :
HTHPlease Login or Register to view this content.
DominicB
The code mentioned is not working in Column X and ColumnAA.
I dont have a clue why it is not working
Hi dpbhatt
It works fine for me.Originally Posted by dpbhatt
Have you copied the whole code from the window - you haven't just tried to alter the lines you think have changed?
Have you placed it in the right place?
Have you completely got rid of the old code?
Are you getting an error?
Is anything happening - is it working on the wrong column?
DominicB
DominicB
I have posted whole code, but the sound is not activated in any of the cell.
Neither in X nor in AA Column.
I am not able to understand why it is not activating
Thanks
Dpbhatt
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks