Discussion Locked

Excel: sound with comments

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Situation: in Excel 95 I could insert comments and sounds with it so if I move cursor over that cell, I would get comment and sound is playing.
Now in Excel 97 I cannot find a way to do the same thing. Even files created in Excel 95 will not do thesame when opened in Excel 97.

Can anybody help me?

8 replies

by c_m_s

Hi there,
If you go to Tools|Options|General look at the Settings area for a check box labeled "Provide feedback with sound". You may have to install sounds which will be on your CD>

Luck,
Mike

by charles byrne

Barmaley,
Later Versions of EXCEL don't support that feature anymore.

See the following link:
http://j-walk.com/ss/excel/tips/tip59.htm

If the comment indicator still appears in the cell and the cell note
has the name of the wave file to play you could do it programmatically with a Macro by using an API Call. You would probably need to keep macro in your personal macro workbook. You would also have to trap for errors and write a function to get just the wav file name from the Commentin case there is extra text in the comment indicator:

'API CALL Include in your module
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

';;To Play Wave Files
Sub PlayWAV()
On Error GoTo CANTPLAY
WAVFile = ActiveCell.Comment.Text
'Assuming wave file in same folder
WAVFile = ThisWorkbook.Path & "\" & WAVFile
Call PlaySound(WAVFile, 0&, SND_ASYNC Or SND_FILENAME)
CANTPLAY:
MsgBox "Can't Play"
End Sub

by charles byrne

Always in a hurry I omitted one line of code:
The line before CANTPLAY should be Exit Sub:

;;To Play Wave Files
Sub PlayWAV()
On Error GoTo CANTPLAY
WAVFile = ActiveCell.Comment.Text
'Assuming wave file in same folder
WAVFile = ThisWorkbook.Path & "\" & WAVFile
Call PlaySound(WAVFile, 0&, SND_ASYNC Or SND_FILENAME)
Exit Sub
CANTPLAY:
MsgBox "Can't Play"
End Sub

Charles

This discussion is closed to new replies.