Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 300
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 300
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I fill a cell in a user form from a selection on same form? Terry Tipsy Excel Discussion (Misc queries) 4 June 11th 07 02:59 PM
How to show User Form when form name is in string? Don Wiss Excel Programming 2 December 9th 06 03:52 AM
How to: User Form to assign a user defined range to a macro variab TrevTrav Excel Programming 1 March 22nd 05 07:57 PM
I am looking to see if anybody has an equivalant user form to Outlooks CONTACT form BruceJ[_2_] Excel Programming 2 October 15th 03 05:28 PM


All times are GMT +1. The time now is 04:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"