here is some code that demonstrates the beep API:-
its also a useful tool im your a musician
(PS i am not jolyon bloomfield)
you will need 3 combos(cmboDec,cmboNote,cmboOct) 1 textbox(text1) 2 labels (label1, label5) 2 buttons(command1, command2)
Option Explicit
'
' Written By Jolyon Bloomfield January 2001
' Frequency Calculator - Used to calculate frequencies for notes of a set pitch
' If you find this useful, thank somebody, long ago, for telling me the formula.
'
' Use this as you wish, just don't claim it as yours, which it is not.
'
' I hopy you enjoy it.
' Jolyon Bloomfield
' ICQ UIN: 11084041 E-mail: Jolyon_B@Hotmail.Com
'
Private Declare Function Beep Lib "kernel32" ( _
ByVal dwFreq As Long, _
ByVal dwDuration As Long _
) As Long
Private Const A1 = 55
Private Sub cmboDec_Click()
Calculate
End Sub
Private Sub cmboNote_Click()
Calculate
End Sub
Private Sub cmboOct_Click()
Calculate
End Sub
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Command2_Click()
Calculate
End Sub
Private Sub Form_Load()
Dim I As Integer
For I = 1 To 8
cmboOct.AddItem I
Next I
cmboOct.ListIndex = 3
For I = 0 To 10
cmboDec.AddItem I
Next I
cmboDec.ListIndex = 3
With cmboNote
.AddItem "A"
.AddItem "Bb"
.AddItem "B"
.AddItem "C"
.AddItem "Db"
.AddItem "D"
.AddItem "Eb"
.AddItem "E"
.AddItem "F"
.AddItem "F#"
.AddItem "G"
.AddItem "Ab"
.ListIndex = 3
End With
End Sub
Private Sub Calculate()
If cmboOct.ListIndex = -1 Or cmboNote.ListIndex = -1 Or cmboDec.ListIndex = -1 Then Exit Sub
Dim Temp As Double
Dim Temp2 As String
Dim returned
Temp = A1 * (2 ^ (cmboOct.ListIndex))
Temp = Temp * (2 ^ ((cmboNote.ListIndex) / 12))
Temp2 = Format(Temp, "#." & String(cmboDec.ListIndex, "#"

)
If Right(Temp2, 1) = "." Then Temp2 = Left(Temp2, Len(Temp2) - 1)
Text1.Text = Temp2 & " Hertz"
returned = Beep(CDbl(Temp2), 500)
End Sub
good luck
If somethings hard to do, its not worth doing - Homer Simpson
------------------------------------------------------------------------
A General Guide To Excel in VB FAQ222-3383
File Formats Galore @