Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Beep is beeping only once

Posted on 2003-12-04
7
Medium Priority
?
389 Views
Last Modified: 2010-05-03
I wrote the code
for i = to 5
     Beep
next i
but the computer beeps only once.
Why?
0
Comment
Question by:SaadDani
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 9880601
for i = 0 to 5
     Beep
next i
0
 

Author Comment

by:SaadDani
ID: 9880614
Its the same...
0
 
LVL 11

Expert Comment

by:dbrckovi
ID: 9880726
Try this:

for i = 1 to 5
     Beep
     Doevents
next i

( I haven't tested it 'cos I don't have speakers at the moment )
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 11

Expert Comment

by:dbrckovi
ID: 9880750
If this doesn't work then try using Timer to do the beeping in some time interval.    (Maybe the loop goes too fast.     Loop is finished even before the first beep finishes )

Create command button and a timer:
--------------------------------------------------------------------
Private Sub Command1_Click()
    Timer1.Interval = 300
    Timer1.Tag = 0
    Timer1.Enabled = True
End Sub

Private Sub Timer1_Timer()
    Timer1.Tag = Timer1.Tag + 1
    Beep
    DoEvents
    If Timer1.Tag = 5 Then Timer1.Enabled = False
End Sub
--------------------------------------------------------------------
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 400 total points
ID: 9880751
All the beeps are merged together.
Try this
Dim i As Integer
Dim j As Long
For i = 0 To 5
     Beep
     For j = 1 To 10000000
     Next j
Next

0
 

Author Comment

by:SaadDani
ID: 9880756
dosn't help...
0
 
LVL 11

Expert Comment

by:dbrckovi
ID: 9880793
Timer method works fine for me.
The lowest value of Timer1.Interval that gives multiple beeps on my comp. is 50. Everything larger than this works fine.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question