Hi
I use the following code to record MIC input to WAV file :


Private Declare Function mciSendString Lib "winmm.dll" Alias _
"mciSendStringA" (ByVal lpstrCommand As String, ByVal _
lpstrReturnString As Any, ByVal uReturnLength As Long, ByVal _
hwndCallback As Long) As Long


Private Sub cmdRecord_Click()
Dim i As Long

i = mciSendString("open new Type waveaudio Alias capture", 0&, 0, 0)
i = mciSendString("set capture bitspersample 8", 0&, 0, 0)
i = mciSendString("set capture samplespersec 11025", 0&, 0, 0)
i = mciSendString("set capture channels 1", 0&, 0, 0)
i = mciSendString("record capture", 0&, 0, 0)

End Sub

Private Sub cmdStopRecord_Click()
Dim i As Long

i = mciSendString("stop capture", 0&, 0, 0)
i = mciSendString("save capture c:\NewWave.wav", 0&, 0, 0)
i = mciSendString("close capture", 0&, 0, 0)
End Sub
-------------------------------------------------------------
My quastion is :
How can I change the name of the file according to input from the user
I tried to create FileName veriable (string) and to change to :

FileName = "abc.wav"
("save capture FileName", 0&, 0, 0)

But it only crears new WAV file name FileName.
Any Idea ?

Thanks
Eran