Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I keep the ding sound from playing when a message appears? Quinn1984 Excel Discussion (Misc queries) 2 September 12th 07 01:04 PM
Playing sound in VBA Pete[_22_] Excel Programming 3 October 10th 05 02:01 PM
Problem with playing sound code EMoe[_39_] Excel Programming 3 July 6th 05 01:30 AM
playing sound??? tess457[_6_] Excel Programming 2 October 20th 04 11:50 AM
Playing a sound base on cell value Mike[_58_] Excel Programming 4 November 30th 03 03:53 AM


All times are GMT +1. The time now is 05:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"