Spreadsheet play file then close

  • Thread starter Thread starter Brenda
  • Start date Start date
B

Brenda

I need to create a workbook that will play a .wav file
then automatically close. Is there anyway to do this
without having "Enable Macros" dialog box pop up and "Do
you want to save this file?" dialog box.

Any way to do this without changing settings on the users
computer?

TIA,
Brenda
 
I need to create a workbook that will play a .wav file
then automatically close. Is there anyway to do this
without having "Enable Macros" dialog box pop up and "Do
you want to save this file?" dialog box.

Any way to do this without changing settings on the users
computer?

Basic question: why do this from an Excel workbook rather than from a VBScript
file?
 
Brenda,
I need to create a workbook that will play a .wav file
Take a look here:
http://j-walk.com/ss/excel/tips/tip59.htm

If you want it to play when the workbook is opened,
call it from a sub named Auto_Open
Sub Auto_Open()
' call j-walks sub here
End Sub

To close it use this:
Sub CloseMe()
ThisWorkbook.Saved = True
Application.Quit
End Sub

The above will quit Excel without any prompts.
If you just want to close the workbook, use
ThisWorkbook.Close
Is there anyway to do this
without having "Enable Macros" dialog box pop up
No. Setting the security level to low is the only way
(other than using a digital certificate).

Having said all that, Harlan's approach would be a lot
better than trying to do this in Excel.

John
 
Back
Top