SimoninParis
New Member
- Joined
- Mar 2, 2012
- Messages
- 25
Hello fellow VBAers,
I hope someone out there can help me.
Recently, I created a small tool/exercise/pedagogical game which works well for me but acts strangely for colleagues. The tool calls a recording (a .wav file) via a Function, the code for which I copied from a forum:
Users (language learners) transcribe the recording word/group of words by word/group of words.
Exercises that I have already created function correctly on my PCs and on those of colleagues. I have shared the "master" Excel workbook with colleagues so they can make their own exercises. While I can use it without any glitches, colleagues elsewhere get error messages (in French I am afraid to say):
Simon
I hope someone out there can help me.
Recently, I created a small tool/exercise/pedagogical game which works well for me but acts strangely for colleagues. The tool calls a recording (a .wav file) via a Function, the code for which I copied from a forum:
Code:
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
Sub PlayWAV()
WAVFile = ClipNo & ".wav"
WAVFile = ThisWorkbook.Path & "\" & WAVFile
Call PlaySound(WAVFile, 0&, SND_ASYNC Or SND_FILENAME)
End Sub
Sub PlayWAV2()
WAVFile = 2 & ".wav"
WAVFile = ThisWorkbook.Path & "\" & WAVFile
Call PlaySound(WAVFile, 0&, SND_ASYNC Or SND_FILENAME)
End Sub
Users (language learners) transcribe the recording word/group of words by word/group of words.
Exercises that I have already created function correctly on my PCs and on those of colleagues. I have shared the "master" Excel workbook with colleagues so they can make their own exercises. While I can use it without any glitches, colleagues elsewhere get error messages (in French I am afraid to say):
Any ideas, please?Un Module protégé contient une erreur de compilation. L’erreur se situant dans un module protégé, elle ne peut pas être affichée.
Cette erreur se produit couramment lorsque le code est incompatible avec la version ou l’architecture de cette application (par exemple, le code dans un document cible des applications Microsoft Office 32 bits, mais il tente de s’exécuter sur Office 64 bits).
La cause et la solution de lÂ’erreur sont les suivantes :
Cause de lÂ’erreur :
- LÂ’erreur est levée lorsquÂ’une erreur de compilation se produit dans le code VBA Ã* lÂ’intérieur dÂ’un m odule protégé (masqué). LÂ’erreur de compilation spécifique nÂ’est pas exposée car le module est protégé.
Solutions possibles :
- Si vous avez accès au code VBA dans le document ou le projet, annulez la protection du module, puis réexécutez le code pour afficher l’erreur spécifique.
- Si vous nÂ’avez pas accès au code VBA dans le document, contactez lÂ’auteur du document afin de mettre Ã* jour le code du module masqué.
Simon