Click to See Complete Forum and Search --> : Out of context


eng70640
April 7th, 2001, 05:22 AM
Below is my code to play .wav file
f = mciSendString("open " & sWAV & " type waveaudio alias voice1", 0&, 0, 0)
f = mciSendString("play voice1", 0&, 0, 0)

I dont know why the VB complier says that the line' f = mciSendString("play voice1", 0&, 0, 0)' is out of context. What is meant by this & can it be solved?

Cimperiali
April 9th, 2001, 02:37 AM
Do you have both line in same sub? Out of context is a classical message that appear when your variables/objects are out of scope: say, you declared/loaded an obiect in a private sub, then tried to use it in another private sub; otr you declared it private in a module, and tried to use it somewhere else...


Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.