Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is an example
Option Explicit Declare Function sndPlaySound32 Lib "winmm.dll" Alias _ "sndPlaySoundA" (ByVal lpszSoundName As String, _ ByVal uFlags As Long) As Long Private Sub Worksheet_Activate() sndPlaySound32 "c:\windows\media\ding.wav", 0 End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH Bob Phillips "Dave" wrote in message ... Is it possible to to create a macro that runs when you click on a worksheet tab to open it, or to change the scripting to achieve that action? Specifically, we would like to have a *.wav file play when a worksheet is opened. Thanks, -- DAS |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excell copy action pauses for 15 second for the smallest action | Excel Discussion (Misc queries) | |||
3D chart - unusual | Charts and Charting in Excel | |||
Unusual Request... | Excel Discussion (Misc queries) | |||
Please help with unusual request? | Excel Discussion (Misc queries) | |||
Unusual question | Excel Programming |