• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 146
  • Last Modified:

saving recorded wav file without overwriting

i have used MCI commands for recording wav file.
in vb  each time when form is loaded recorded wav file
is being overwritten.is there any command or code to
record wav file without overwriting.
what we want is each time form is loaded it should
store  with a different name
0
tanvi
Asked:
tanvi
1 Solution
 
vinnyd79Commented:
you could write a function to check if a wave file exists,then rename it with a number on the end.Maybe something like this:

Private Sub Command1_Click()
MsgBox GetUniqWavName("C:\Test.wav")
End Sub

Private Function GetUniqWavName(WavName As String) As String
Dim i As Integer
Dim arrWav() As String
arrWav = Split(WavName, ".")
i = 1
Do Until Dir(WavName) = ""
    WavName = arrWav(0) & i & ".wav"
    i = i + 1
Loop
GetUniqWavName = WavName
End Function
0
 
CleanupPingCommented:
Hi tanvi,
This old question (QID 20559455) needs to be finalized -- accept an answer, split points, or get a refund.  Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.
0
 
GPrentice00Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

-->Accept vinnyd79's comments as answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

GPrentice00
EE Cleanup Volunteer
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now