View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Edit my Macro Please

JLGWhiz seems to have lost the "beepTime" subroutine.

Here's an alternative:

Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sub MultiBeep(Optional NumBeeps As Long = 1)
Dim Counter As Long
For Counter = 1 To NumBeeps
Beep
Sleep 250 'quarter of a second
Next Counter
End Sub
Sub test2()
Call MultiBeep(2)
End Sub

(With just a few changes to be irritating <vbg.)




JLGWhiz wrote:

Here is one that I have used:

Sub MultiBeep(NumBeeps)
For Counter = 1 To NumBeeps
Beep
Run "BeepTime"
Next Counter
End Sub

You use it like a function. If you want 2 beeps then:

Sub test()
MultiBeep 2
End Sub

For three beeps

Sub test2()
MultiBeep 3
End Sub

"Gerard Sanchez" wrote:

'Hi,

'Currently I am using the function below to and called on whenever there is
a discrepancy between two values on an IF formula.

Function beepNow()
Beep
End Function

'I was wondering if there is a way for me to do 2 beeps aside from the 1
beep above I can call whenever certain cells changes its value.
This would be applied to the whole workbook.

'Any input would be very much appreciated!




--

Dave Peterson