PDA

View Full Version : [SOLVED:] Help with a msgbox :)



Daxton A.
04-02-2014, 09:03 AM
I have searched the internet out the wazoo!

I am creating a Timer in vba and for the alarm I am trying to run a sound file. My issue is the automatic popup that is asking me if I want to run this file. I tried application.displayalerts and it did not work and I also tried microsoft's "MicrosoftFixit50681.msi" app and it did not work either!

The last thing I tried to find was the name of the form and the name of the ok button so that i can automatically press the ok button and work with this problem...but guess what!? No luck...

MessageBox says:

"Microsoft Office" in the caption

Opening C:\Downloads\beep-02.mp3

Some files may contain viruses or otherwise be harmful to your
computer.
It is important to be certain that thisfile is from a trustworthy source.

Would you like to open this file?

Thanks,
:think:Daxton Allen:crying::banghead::dunno

Crosspost:
http://www.mrexcel.com/forum/excel-questions/767834-relating-warning-i-get-excel-playing-sound-file.html

Daxton A.
04-02-2014, 09:35 AM
"We got to pray just to make it today!" - MC Hammer?

Daxton A.
04-02-2014, 10:00 AM
I'm having trouble uploading the file "beep-02.mp3"
But, I found it online. :)

SamT
04-02-2014, 10:21 AM
What about
Sub Beeper()
Const NumBeeps As Long = 3
Dim TimeBetweenBeeps 'Assignment of Wait required
Dim i As Long

For i = 1 To NumBeeps
TimeBetweenBeeps = Application.Wait(Now + TimeValue("0:00:01"))
Beep
Next i
End Sub

Daxton A.
04-02-2014, 11:39 AM
That is alot smoother macro, thank you so much!

Sincerely,
Daxton