+ Reply to Thread
Results 1 to 13 of 13

.wav file is played on change in Column

  1. #1
    Registered User
    Join Date
    06-02-2008
    Posts
    8

    Smile .wav file is played on change in Column

    I want a .wav file to be played on change in A column.

    Anyone having a vb code please help me.

    Thanking

  2. #2
    Registered User
    Join Date
    11-05-2007
    Location
    Pune, India
    Posts
    51
    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.

    Please Login or Register  to view this content.
    You can check the following link too if you want
    http://groups.google.com/group/micro...2b0c91b13a1fe1
    Thanks!
    Vikas Bhandari
    http://excelnoob.blogspot.com

  3. #3
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    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.

    Please Login or Register  to view this content.
    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  4. #4
    Registered User
    Join Date
    06-02-2008
    Posts
    8

    .wav file does not work if there is a formula in the column

    Thank for the help.
    The .wav file does not work if there is a formula in the column.
    Can you please help again

  5. #5
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    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

  6. #6
    Registered User
    Join Date
    06-02-2008
    Posts
    8

    Smile Whenever a Cell is changed due to formula

    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.

  7. #7
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    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 :

    Please Login or Register  to view this content.
    HTH

    DominicB

  8. #8
    Registered User
    Join Date
    06-02-2008
    Posts
    8

    Smile Thanks a Lot

    This is working perfectly, Thanks a Lot, God Bless you.

  9. #9
    Registered User
    Join Date
    06-02-2008
    Posts
    8

    Smile i want a sound only for change in Column X & Column AA

    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

  10. #10
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Hi dpbhatt

    Try this modification :

    Please Login or Register  to view this content.
    HTH

    DominicB

  11. #11
    Registered User
    Join Date
    06-02-2008
    Posts
    8

    Smile This Code is not working

    The code mentioned is not working in Column X and ColumnAA.
    I dont have a clue why it is not working

  12. #12
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Hi dpbhatt

    Quote Originally Posted by dpbhatt
    The code mentioned is not working in Column X and ColumnAA.
    I dont have a clue why it is not working
    It works fine for me.
    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

  13. #13
    Registered User
    Join Date
    06-02-2008
    Posts
    8

    Smile i have posted the same code, but still the sound is not activated

    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1