Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
playing a sound in a macro
hello,
I'm trying to play a sound through a macro. I record the macro, during which, i right click on my media file, choose play, it plays then the macro continues to do something else whilst the sound is playing. However when i run the macro, the sound doesn't play - can anyone help? Thanks -- kelly m johnson |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
playing a sound in a macro
Post the macro
-- Gary''s Student "Kelly 1st" wrote: hello, I'm trying to play a sound through a macro. I record the macro, during which, i right click on my media file, choose play, it plays then the macro continues to do something else whilst the sound is playing. However when i run the macro, the sound doesn't play - can anyone help? Thanks -- kelly m johnson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
playing a sound in a macro
all the stuff underneath the first 2 lines is what the macro does - the first
2 lines are where i press the sound wav sound... (I have inserted it as a media clip... then attached my own sound to it) Sub data() ' ' data Macro ' Macro recorded 23/11/2005 by Kelly Johnson ' ' Range("D10").Select ActiveSheet.Shapes("Object 36").Select Range("D9").Select Sheets("Data Collection").Select Rows("5:5").Select Range("BM5").Activate Selection.Insert Shift:=xlDown Sheets("Technical Audit").Select Range("C2:C22").Select Selection.Copy Sheets("Data Collection").Select Range("BM5").Select ActiveWindow.ScrollColumn = 1 Range("A5").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True ActiveWindow.SmallScroll ToRight:=18 Sheets("Technical Audit").Select ActiveWindow.SmallScroll Down:=15 Range("C25:C77").Select Application.CutCopyMode = False Selection.Copy Sheets("Data Collection").Select Range("V5").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True ActiveWindow.ScrollColumn = 69 Sheets("Technical Audit").Select ActiveWindow.SmallScroll Down:=54 Range("D68:D73").Select Application.CutCopyMode = False Selection.Copy Sheets("Data Collection").Select Range("BW5").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True Sheets("Technical Audit").Select Range("C70").Select ActiveWindow.SmallScroll Down:=-48 Range("C23:C24").Select Application.CutCopyMode = False Selection.Copy Sheets("Data Collection").Select Range("CD5").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True Sheets("Technical Audit").Select ActiveWindow.SmallScroll Down:=-24 Range("C3:C77").Select Application.CutCopyMode = False Selection.ClearContents Range("C3").Select End Sub -- kelly m johnson Great Britain "Gary''s Student" wrote: Post the macro -- Gary''s Student "Kelly 1st" wrote: hello, I'm trying to play a sound through a macro. I record the macro, during which, i right click on my media file, choose play, it plays then the macro continues to do something else whilst the sound is playing. However when i run the macro, the sound doesn't play - can anyone help? Thanks -- kelly m johnson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
playing a sound in a macro
After selecting the object I think you need a:
Selection.Verb Verb:=xlPrimary The recorder should have generated this/ -- Gary''s Student "Kelly 1st" wrote: all the stuff underneath the first 2 lines is what the macro does - the first 2 lines are where i press the sound wav sound... (I have inserted it as a media clip... then attached my own sound to it) Sub data() ' ' data Macro ' Macro recorded 23/11/2005 by Kelly Johnson ' ' Range("D10").Select ActiveSheet.Shapes("Object 36").Select Range("D9").Select Sheets("Data Collection").Select Rows("5:5").Select Range("BM5").Activate Selection.Insert Shift:=xlDown Sheets("Technical Audit").Select Range("C2:C22").Select Selection.Copy Sheets("Data Collection").Select Range("BM5").Select ActiveWindow.ScrollColumn = 1 Range("A5").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True ActiveWindow.SmallScroll ToRight:=18 Sheets("Technical Audit").Select ActiveWindow.SmallScroll Down:=15 Range("C25:C77").Select Application.CutCopyMode = False Selection.Copy Sheets("Data Collection").Select Range("V5").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True ActiveWindow.ScrollColumn = 69 Sheets("Technical Audit").Select ActiveWindow.SmallScroll Down:=54 Range("D68:D73").Select Application.CutCopyMode = False Selection.Copy Sheets("Data Collection").Select Range("BW5").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True Sheets("Technical Audit").Select Range("C70").Select ActiveWindow.SmallScroll Down:=-48 Range("C23:C24").Select Application.CutCopyMode = False Selection.Copy Sheets("Data Collection").Select Range("CD5").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True Sheets("Technical Audit").Select ActiveWindow.SmallScroll Down:=-24 Range("C3:C77").Select Application.CutCopyMode = False Selection.ClearContents Range("C3").Select End Sub -- kelly m johnson Great Britain "Gary''s Student" wrote: Post the macro -- Gary''s Student "Kelly 1st" wrote: hello, I'm trying to play a sound through a macro. I record the macro, during which, i right click on my media file, choose play, it plays then the macro continues to do something else whilst the sound is playing. However when i run the macro, the sound doesn't play - can anyone help? Thanks -- kelly m johnson |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
playing a sound in a macro
I embedded an mp3 file and it played if my application was open before
running the macro. -- Gary's Student "Gary''s Student" wrote: After selecting the object I think you need a: Selection.Verb Verb:=xlPrimary The recorder should have generated this/ -- Gary''s Student "Kelly 1st" wrote: all the stuff underneath the first 2 lines is what the macro does - the first 2 lines are where i press the sound wav sound... (I have inserted it as a media clip... then attached my own sound to it) Sub data() ' ' data Macro ' Macro recorded 23/11/2005 by Kelly Johnson ' ' Range("D10").Select ActiveSheet.Shapes("Object 36").Select Range("D9").Select Sheets("Data Collection").Select Rows("5:5").Select Range("BM5").Activate Selection.Insert Shift:=xlDown Sheets("Technical Audit").Select Range("C2:C22").Select Selection.Copy Sheets("Data Collection").Select Range("BM5").Select ActiveWindow.ScrollColumn = 1 Range("A5").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True ActiveWindow.SmallScroll ToRight:=18 Sheets("Technical Audit").Select ActiveWindow.SmallScroll Down:=15 Range("C25:C77").Select Application.CutCopyMode = False Selection.Copy Sheets("Data Collection").Select Range("V5").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True ActiveWindow.ScrollColumn = 69 Sheets("Technical Audit").Select ActiveWindow.SmallScroll Down:=54 Range("D68:D73").Select Application.CutCopyMode = False Selection.Copy Sheets("Data Collection").Select Range("BW5").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True Sheets("Technical Audit").Select Range("C70").Select ActiveWindow.SmallScroll Down:=-48 Range("C23:C24").Select Application.CutCopyMode = False Selection.Copy Sheets("Data Collection").Select Range("CD5").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True Sheets("Technical Audit").Select ActiveWindow.SmallScroll Down:=-24 Range("C3:C77").Select Application.CutCopyMode = False Selection.ClearContents Range("C3").Select End Sub -- kelly m johnson Great Britain "Gary''s Student" wrote: Post the macro -- Gary''s Student "Kelly 1st" wrote: hello, I'm trying to play a sound through a macro. I record the macro, during which, i right click on my media file, choose play, it plays then the macro continues to do something else whilst the sound is playing. However when i run the macro, the sound doesn't play - can anyone help? Thanks -- kelly m johnson |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
playing a sound in a macro
thank you.... I shall try that
-- kelly m johnson Great Britain "Gary''s Student" wrote: I embedded an mp3 file and it played if my application was open before running the macro. -- Gary's Student "Gary''s Student" wrote: After selecting the object I think you need a: Selection.Verb Verb:=xlPrimary The recorder should have generated this/ -- Gary''s Student "Kelly 1st" wrote: all the stuff underneath the first 2 lines is what the macro does - the first 2 lines are where i press the sound wav sound... (I have inserted it as a media clip... then attached my own sound to it) Sub data() ' ' data Macro ' Macro recorded 23/11/2005 by Kelly Johnson ' ' Range("D10").Select ActiveSheet.Shapes("Object 36").Select Range("D9").Select Sheets("Data Collection").Select Rows("5:5").Select Range("BM5").Activate Selection.Insert Shift:=xlDown Sheets("Technical Audit").Select Range("C2:C22").Select Selection.Copy Sheets("Data Collection").Select Range("BM5").Select ActiveWindow.ScrollColumn = 1 Range("A5").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True ActiveWindow.SmallScroll ToRight:=18 Sheets("Technical Audit").Select ActiveWindow.SmallScroll Down:=15 Range("C25:C77").Select Application.CutCopyMode = False Selection.Copy Sheets("Data Collection").Select Range("V5").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True ActiveWindow.ScrollColumn = 69 Sheets("Technical Audit").Select ActiveWindow.SmallScroll Down:=54 Range("D68:D73").Select Application.CutCopyMode = False Selection.Copy Sheets("Data Collection").Select Range("BW5").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True Sheets("Technical Audit").Select Range("C70").Select ActiveWindow.SmallScroll Down:=-48 Range("C23:C24").Select Application.CutCopyMode = False Selection.Copy Sheets("Data Collection").Select Range("CD5").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True Sheets("Technical Audit").Select ActiveWindow.SmallScroll Down:=-24 Range("C3:C77").Select Application.CutCopyMode = False Selection.ClearContents Range("C3").Select End Sub -- kelly m johnson Great Britain "Gary''s Student" wrote: Post the macro -- Gary''s Student "Kelly 1st" wrote: hello, I'm trying to play a sound through a macro. I record the macro, during which, i right click on my media file, choose play, it plays then the macro continues to do something else whilst the sound is playing. However when i run the macro, the sound doesn't play - can anyone help? Thanks -- kelly m johnson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I keep the ding sound from playing when a message appears? | Excel Discussion (Misc queries) | |||
Playing sound in VBA | Excel Programming | |||
Problem with playing sound code | Excel Programming | |||
playing sound??? | Excel Programming | |||
Playing a sound base on cell value | Excel Programming |