![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Feb 2002
Posts: 40
|
I know, I know, this is a stupid question, and you're wondering why would I ever want to do this, but is there any way to generate a sound (say a wav file) when you initially open an Excel document?
Thanks. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
I have done this and I did it as a joke on some people's machines, so I'm not wondering why you're wanting this at all.
Here's a link to a for an example: http://www.zarr.net/vb/download/codedetail.asp?code=217 HTH |
|
|
|
|
|
#3 |
|
New Member
Join Date: Feb 2002
Posts: 40
|
Thanks a ton. Didn't really think it was possible. I'll give it a try. Glad to see that there are other wacked people out there.
|
|
|
|
|
|
#4 |
|
New Member
Join Date: Feb 2002
Posts: 40
|
Sorry, but not being anywhere NEAR an Excel expert, I'm struggling on this one. I'm not sure what a Module is. Also, in your example, the name of the file was MyWavFile. Does that name go anywhere else or just on the Call line? Can you help me out a bit more...guess I need some hand holding on this one...
THANKS! |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Location: Where the wild roses grow
Posts: 285
|
Hiya, I've sent you some help via your private messages if you need it
Good luck |
|
|
|
|
|
#6 |
|
New Member
Join Date: Feb 2002
Posts: 40
|
Hey Joe...if you have a second, can you check your private messages...had one more question.
Thanks! |
|
|
|
|
|
#7 | |
|
Guest
Posts: n/a
|
Quote:
1. Open a new Excel workboox. 2. Right Click on the Icon to the left of "File" on the main menu. 3. Choose "View Code" 4. Copy and Paste this code into the window that opens up:
5. Change the part of the code that says "C:TempGoBlue.wav" to the fulle path of your wav file. 6. Now got to "File|Save Book1" 7. Rename the file to whatever you want e.g. "PlaySound" and change the "Save As Type" combobox to be "Excel Add In *.xla" (this is the last option in the combobox.) Now for the interesting part 8. Go back to your Excel spreadsheet and choose "Tools|Add Ins". 9. In the list you will hopefully find "PlaySound" or whatever you've named your *.xla. 10. Check the box beside this. 11. When you next open Excel this should play the file for you. Hope this works for you. |
|
|
|
|
#8 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
Damn, I got timed out, that anonymous post was from me.
I put that whole message there because there's no point in solving people's problems by private message. Private messages defeat the purpose of the message board. Cheers |
|
|
|
|
|
#9 |
|
Board Regular
Join Date: Feb 2002
Location: Where the wild roses grow
Posts: 285
|
The reason I sent a private message with some pointers was as a backup if you didnt send an answer, hence the words "if you need it". I didn't want to tread on yout toes or appear to be cutting in. Besides which, all I did was give some pointers on how to set a module up, not exactly rocket science.
I do apologise though, next time I'll check my book, "How To Use A Message Board" [ This Message was edited by: Audiojoe on 2002-03-08 07:04 ] |
|
|
|
|
|
#10 |
|
New Member
Join Date: Feb 2002
Posts: 40
|
Hi Mark. Thanks a ton. I think I'm close, but it won't work yet. When I right mouse click and choose View Code, it opens up to an "Open" book. Do I add it after what's typed there or somewhere else?
...I'll eventually get this... I hope... Thanks for your patience. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|