PC Review


Reply
Thread Tools Rate Thread

Sound / Beep function from within VB or Excel VBA

 
 
tomcee
Guest
Posts: n/a
 
      16th Oct 2007
I would like to output a sound with specific frequency and amplitude
through the pc soundcard (like the 'sound' function in QB).
(It appears that both VB and ExcelVBA have only a very simple 'Beep'
command.)
Control of channel (left and right) would be nice too.
Thanks,
TomCee

 
Reply With Quote
 
 
 
 
JW
Guest
Posts: n/a
 
      16th Oct 2007
Have a look here.
http://www.exceltip.com/st/Playing_s...Excel/461.html

tomcee wrote:
> I would like to output a sound with specific frequency and amplitude
> through the pc soundcard (like the 'sound' function in QB).
> (It appears that both VB and ExcelVBA have only a very simple 'Beep'
> command.)
> Control of channel (left and right) would be nice too.
> Thanks,
> TomCee


 
Reply With Quote
 
 
 
 
tomcee
Guest
Posts: n/a
 
      16th Oct 2007
On Oct 16, 10:19 am, JW <(E-Mail Removed)> wrote:
> Have a look here.http://www.exceltip.com/st/Playing_s...A_in_Microsoft...
>
>
>
> tomcee wrote:
> > I would like to output a sound with specific frequency and amplitude
> > through the pc soundcard (like the 'sound' function in QB).
> > (It appears that both VB and ExcelVBA have only a very simple 'Beep'
> > command.)
> > Control of channel (left and right) would be nice too.
> > Thanks,
> > TomCee- Hide quoted text -

>
> - Show quoted text -


Thanks for the tip, but that tip shows how to play .wav files.

I would like to specify the frequency and duration (like the 'sound'
command in QB), and have the system generate that tone through the
speakers.
Thanks,
TomCee

 
Reply With Quote
 
Alice
Guest
Posts: n/a
 
      17th Oct 2007
Private Type tbeep
F As Long
D As Long
End Type

Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal
dwDuration As Long) As Long

dim B as tbeep

b.F = 200 ' Frequency interval from 37 to 10000
b.D = 100 ' Duration

Beep b.F, b.D

Fede

"tomcee" <(E-Mail Removed)> ha scritto nel messaggio
news:(E-Mail Removed)...
> On Oct 16, 10:19 am, JW <(E-Mail Removed)> wrote:
> > Have a look

here.http://www.exceltip.com/st/Playing_s...A_in_Microsoft..
..
> >
> >
> >
> > tomcee wrote:
> > > I would like to output a sound with specific frequency and amplitude
> > > through the pc soundcard (like the 'sound' function in QB).
> > > (It appears that both VB and ExcelVBA have only a very simple 'Beep'
> > > command.)
> > > Control of channel (left and right) would be nice too.
> > > Thanks,
> > > TomCee- Hide quoted text -

> >
> > - Show quoted text -

>
> Thanks for the tip, but that tip shows how to play .wav files.
>
> I would like to specify the frequency and duration (like the 'sound'
> command in QB), and have the system generate that tone through the
> speakers.
> Thanks,
> TomCee
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: SY-P4VTE Beep Beep Beep John McGaw DIY PC 0 4th Oct 2005 11:46 PM
Re: SY-P4VTE Beep Beep Beep Dee DIY PC 0 4th Oct 2005 11:43 PM
Re: SY-P4VTE Beep Beep Beep C DIY PC 0 4th Oct 2005 11:33 PM
System Produce BEEP BEEP BEEP.... Desmond Microsoft Windows 2000 4 8th Jun 2004 09:38 PM
A7V133-VM + PCI video = BEEP BEEP BEEP BEEP? Lost Asus Motherboards 2 13th Nov 2003 06:33 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:32 PM.