Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form pop up with a beep?
I'd like a User Form to make the same beep as a MsgBox makes when it pops
up. I tried the word Beep in front of my User Form show, but I got no sound. Don <www.donwiss.com (e-mail link at home page bottom). |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form pop up with a beep?
does this work for you
Private Sub UserForm_Initialize() Beep End Sub -- Gary "Don Wiss" wrote in message ... I'd like a User Form to make the same beep as a MsgBox makes when it pops up. I tried the word Beep in front of my User Form show, but I got no sound. Don <www.donwiss.com (e-mail link at home page bottom). |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form pop up with a beep?
On Sun, 10 Dec 2006, Gary Keramidas <GKeramidasATmsn.com wrote:
does this work for you Private Sub UserForm_Initialize() Beep End Sub Nope. Don <www.donwiss.com (e-mail link at home page bottom). |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form pop up with a beep?
you have events turned off or something? make a new form and just add these
lines of code to it, it should work. -- Gary "Don Wiss" wrote in message ... On Sun, 10 Dec 2006, Gary Keramidas <GKeramidasATmsn.com wrote: does this work for you Private Sub UserForm_Initialize() Beep End Sub Nope. Don <www.donwiss.com (e-mail link at home page bottom). |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form pop up with a beep?
Beep works for me - do you have your speakers turned down./off, headphones
plugged in. Is the messagebox audible. Here is a way to do it with the API (but the speakers have to be on). In NT/XP/2003, you can control the internal speaker (which makes the beep) Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, _ ByVal dwDuration As Long) As Long Sub Beep1() Dim num As Single Dim num1 As Long Dim numLoops As Single num = 10 NumSeconds = 4 '<== duration numLoops = (NumSeconds * num * 2) / 2 If numLoops < 1 Then numLoops = 1 End If num1 = 1000 / (num * 2) For i = 1 To numLoops 'DoEvents Beep 500, num1 'DoEvents Beep 10000, num1 'DoEvents Next End Sub The first argument is the frequency. You can change the 10000 (you can't hear that) to 1000 to get a different affect for example. -- Regards, Tom Ogilvy "Don Wiss" wrote in message ... On Sun, 10 Dec 2006, Gary Keramidas <GKeramidasATmsn.com wrote: does this work for you Private Sub UserForm_Initialize() Beep End Sub Nope. Don <www.donwiss.com (e-mail link at home page bottom). |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I fill a cell in a user form from a selection on same form? | Excel Discussion (Misc queries) | |||
How to show User Form when form name is in string? | Excel Programming | |||
How to: User Form to assign a user defined range to a macro variab | Excel Programming | |||
I am looking to see if anybody has an equivalant user form to Outlooks CONTACT form | Excel Programming |