Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Is it possible to embed a wav file, used to signal an event, within a
workbook and then be able to take a copy of the excel file and get it to run (with the sound file) on another computer? Thanks for any advice. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Here is a start. the code below will find the embedded object and play th
etune. You can add the code to a worksheet open function to automatically play the wav file when the workbook is opened. Sub Playtune() For Each obj In ActiveSheet.OLEObjects 'play ole object obj.Activate Next obj End Sub "ARGT" wrote: Is it possible to embed a wav file, used to signal an event, within a workbook and then be able to take a copy of the excel file and get it to run (with the sound file) on another computer? Thanks for any advice. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
First insert the wav file like:
Insert Object... Create from File C:\Program Files\Microsoft Office\OFFICE11\REMINDER.WAV Then set the trigger. For example, this worksheet event macro will active the sound if the value 1 is entered in cell A1: Private Sub Worksheet_Change(ByVal Target As Range) Set t = Target Set a1 = Range("A1") If Intersect(t, a1) Is Nothing Then Exit Sub If a1.Value < 1 Then Exit Sub ActiveSheet.Shapes("Object 1").Select Selection.Verb Verb:=xlPrimary a1.Select End Sub -- Gary''s Student - gsnu200795 "ARGT" wrote: Is it possible to embed a wav file, used to signal an event, within a workbook and then be able to take a copy of the excel file and get it to run (with the sound file) on another computer? Thanks for any advice. |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks Joel and Gary's Student
The advice was just what I needed and it works well. many thanks "Gary''s Student" wrote: First insert the wav file like: Insert Object... Create from File C:\Program Files\Microsoft Office\OFFICE11\REMINDER.WAV Then set the trigger. For example, this worksheet event macro will active the sound if the value 1 is entered in cell A1: Private Sub Worksheet_Change(ByVal Target As Range) Set t = Target Set a1 = Range("A1") If Intersect(t, a1) Is Nothing Then Exit Sub If a1.Value < 1 Then Exit Sub ActiveSheet.Shapes("Object 1").Select Selection.Verb Verb:=xlPrimary a1.Select End Sub -- Gary''s Student - gsnu200795 "ARGT" wrote: Is it possible to embed a wav file, used to signal an event, within a workbook and then be able to take a copy of the excel file and get it to run (with the sound file) on another computer? Thanks for any advice. |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Small problem. The embedding of the wav file worked well with Excel 2003 (on
one PC I use) but just causes Excel 2002 (on another machine) to hang up. It just shows an insertion box and stops responding. Any ideas? "Gary''s Student" wrote: First insert the wav file like: Insert Object... Create from File C:\Program Files\Microsoft Office\OFFICE11\REMINDER.WAV Then set the trigger. For example, this worksheet event macro will active the sound if the value 1 is entered in cell A1: Private Sub Worksheet_Change(ByVal Target As Range) Set t = Target Set a1 = Range("A1") If Intersect(t, a1) Is Nothing Then Exit Sub If a1.Value < 1 Then Exit Sub ActiveSheet.Shapes("Object 1").Select Selection.Verb Verb:=xlPrimary a1.Select End Sub -- Gary''s Student - gsnu200795 "ARGT" wrote: Is it possible to embed a wav file, used to signal an event, within a workbook and then be able to take a copy of the excel file and get it to run (with the sound file) on another computer? Thanks for any advice. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Embedded If Limitation | Excel Worksheet Functions | |||
limit on embedded IFs ? | Excel Worksheet Functions | |||
embedded ifs | Excel Worksheet Functions | |||
Embedded objects | Excel Discussion (Misc queries) | |||
macros embedded | Excel Discussion (Misc queries) |