Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Embed pictures and sound that show when needed

I want to do something that I've never done before, and I'm hoping someone
can help me with it. I'm helping a friend that's having a charity fundraiser
with a spreadsheet that he'll show with a projector on a wall. As donations
are made a thermometer sort of graphic will slowly edge up to the goal
(actually I just used conditional formatting for that). Different area
leaders turn in their donations and they're recorded by area in the proper
cells (there's a running total in cell H2), and as certain milestones are
reached I'd like for a .wav file to play, and maybe a graphic of a partying
guy to show for a few seconds just to keep it light. I already have the clip
art and .wav file, and I assume I put them on another worksheet until needed?
If it matters the goal is $200,000, and I'd like for the clapping and graphic
to show at maybe every $25,000. I really appreciate the help.

--
Message posted via http://www.officekb.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Embed pictures and sound that show when needed

Hi Joe
You can start with this :
http://www.andypope.info/charts/thermometer.htm.
HTH
John
"Joe_Hunt via OfficeKB.com" <u45578@uwe wrote in message
news:a62e272449dfa@uwe...
I want to do something that I've never done before, and I'm hoping someone
can help me with it. I'm helping a friend that's having a charity fundraiser
with a spreadsheet that he'll show with a projector on a wall. As donations
are made a thermometer sort of graphic will slowly edge up to the goal
(actually I just used conditional formatting for that). Different area
leaders turn in their donations and they're recorded by area in the proper
cells (there's a running total in cell H2), and as certain milestones are
reached I'd like for a .wav file to play, and maybe a graphic of a partying
guy to show for a few seconds just to keep it light. I already have the clip
art and .wav file, and I assume I put them on another worksheet until needed?
If it matters the goal is $200,000, and I'd like for the clapping and graphic
to show at maybe every $25,000. I really appreciate the help.

--
Message posted via http://www.officekb.com


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Embed pictures and sound that show when needed

Wow, those beat the fire out of what I came up with for a thermometer. Thanks!
That'll look great as a graphic. I've been experimenting with the sound but
with no success yet.

John wrote:
Hi Joe
You can start with this :
http://www.andypope.info/charts/thermometer.htm.
HTH
John
I want to do something that I've never done before, and I'm hoping someone
can help me with it. I'm helping a friend that's having a charity fundraiser

[quoted text clipped - 8 lines]
If it matters the goal is $200,000, and I'd like for the clapping and graphic
to show at maybe every $25,000. I really appreciate the help.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/201004/1

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Embed pictures and sound that show when needed

Hi again
To incorporate sound, go to Insert Object Select "Create from File" Tab,
press the browse button and go find your wave file.
You will need VBA codes to program the start.
HTH
John

"Joe_Hunt via OfficeKB.com" <u45578@uwe wrote in message
news:a62e6a43be564@uwe...
Wow, those beat the fire out of what I came up with for a thermometer. Thanks!
That'll look great as a graphic. I've been experimenting with the sound but
with no success yet.

John wrote:
Hi Joe
You can start with this :
http://www.andypope.info/charts/thermometer.htm.
HTH
John
I want to do something that I've never done before, and I'm hoping someone
can help me with it. I'm helping a friend that's having a charity fundraiser

[quoted text clipped - 8 lines]
If it matters the goal is $200,000, and I'd like for the clapping and
graphic
to show at maybe every $25,000. I really appreciate the help.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/201004/1


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Embed pictures and sound that show when needed

Hi Joe
Here is some code that may work for you.
Will need more details.
-----------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("B2") = "25000" Then
ActiveSheet.Shapes("Object 1").Select
Selection.Verb Verb:=xlPrimary
End If
End Sub
--------------------
HTH
John

"Joe_Hunt via OfficeKB.com" <u45578@uwe wrote in message
news:a62e6a43be564@uwe...
Wow, those beat the fire out of what I came up with for a thermometer. Thanks!
That'll look great as a graphic. I've been experimenting with the sound but
with no success yet.

John wrote:
Hi Joe
You can start with this :
http://www.andypope.info/charts/thermometer.htm.
HTH
John
I want to do something that I've never done before, and I'm hoping someone
can help me with it. I'm helping a friend that's having a charity fundraiser

[quoted text clipped - 8 lines]
If it matters the goal is $200,000, and I'd like for the clapping and
graphic
to show at maybe every $25,000. I really appreciate the help.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/201004/1




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Embed pictures and sound that show when needed

Thank you John. I've pulled in two wav files to play with, one is entitled
"tada.wav" and the other I renamed to "clap.wav". I changed the name in the
coding from Object 1 to tada.wav and it wouldn't work. Just so you'll know
what I'm doing, there are 60 odd "camps" that are on the spreadsheet, that
are divided into 7 areas. There's a totals box in cell H2 that totals the 7
areas. We wouldn't want it to play a sound every time there's a change in the
cell, or it would be going off 60 odd times, which could get to be a little
too much. If that's too much of an issue just going off when and if it hits
the goal would be fine.

John wrote:
Hi Joe
Here is some code that may work for you.
Will need more details.
-----------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("B2") = "25000" Then
ActiveSheet.Shapes("Object 1").Select
Selection.Verb Verb:=xlPrimary
End If
End Sub
--------------------
HTH
John

Wow, those beat the fire out of what I came up with for a thermometer. Thanks!
That'll look great as a graphic. I've been experimenting with the sound but

[quoted text clipped - 11 lines]
graphic
to show at maybe every $25,000. I really appreciate the help.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/201004/1

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Embed pictures and sound that show when needed

Joe
Object1 is the player not the song, you can see that on the top left window
above the first cell A.
If you followed the instruction I sent you and type 25000 or more in cell B2,
the wav file should play.
This is just for testing I know you'll need more code.
Now if you replace Object1 and start new, it will be Object2, check in the
window above "A" then change the macro.
Good Luck
John

"Joe_Hunt via OfficeKB.com" <u45578@uwe wrote in message
news:a62efbabb4319@uwe...
Thank you John. I've pulled in two wav files to play with, one is entitled
"tada.wav" and the other I renamed to "clap.wav". I changed the name in the
coding from Object 1 to tada.wav and it wouldn't work. Just so you'll know
what I'm doing, there are 60 odd "camps" that are on the spreadsheet, that
are divided into 7 areas. There's a totals box in cell H2 that totals the 7
areas. We wouldn't want it to play a sound every time there's a change in the
cell, or it would be going off 60 odd times, which could get to be a little
too much. If that's too much of an issue just going off when and if it hits
the goal would be fine.

John wrote:
Hi Joe
Here is some code that may work for you.
Will need more details.
-----------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("B2") = "25000" Then
ActiveSheet.Shapes("Object 1").Select
Selection.Verb Verb:=xlPrimary
End If
End Sub
--------------------
HTH
John

Wow, those beat the fire out of what I came up with for a thermometer.
Thanks!
That'll look great as a graphic. I've been experimenting with the sound but

[quoted text clipped - 11 lines]
graphic
to show at maybe every $25,000. I really appreciate the help.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/201004/1


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Embed pictures and sound that show when needed

You could try something like this

Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" ( _
ByVal lpszName As String, _
ByVal hModule As Long, _
ByVal dwFlags As Long) As Long
Private Const SND_ASYNC = &H1
Private Const SND_FILENAME = &H20000

Sub test()
Dim sPath As String, sWavFile As String

sPath = ThisWorkbook.Path & "\" ' or some other path
sWavFile = "myTune.wav"

PlaySound WavFile, 0, SND_ASYNC Or SND_FILENAME

Call PlaySound(sPath & sWavFile, 0, SND_ASYNC Or SND_FILENAME)

End Sub

Regards,
Peter T

"Joe_Hunt via OfficeKB.com" <u45578@uwe wrote in message
news:a62e6a43be564@uwe...
Wow, those beat the fire out of what I came up with for a thermometer.
Thanks!
That'll look great as a graphic. I've been experimenting with the sound
but
with no success yet.

John wrote:
Hi Joe
You can start with this :
http://www.andypope.info/charts/thermometer.htm.
HTH
John
I want to do something that I've never done before, and I'm hoping
someone
can help me with it. I'm helping a friend that's having a charity
fundraiser

[quoted text clipped - 8 lines]
If it matters the goal is $200,000, and I'd like for the clapping and
graphic
to show at maybe every $25,000. I really appreciate the help.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/201004/1



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 embed pictures into a table that is sortable? unclesam Excel Discussion (Misc queries) 0 May 31st 07 01:40 PM
How do I embed a pictures to a excell spreadsheet cell db281961 New Users to Excel 1 January 12th 06 05:18 PM
Is it possible to embed pictures or graphics in Excel? msleah Excel Discussion (Misc queries) 1 December 20th 05 01:09 PM
Is it possible to embed pictures or graphics in Excel? msleah Excel Discussion (Misc queries) 1 December 20th 05 01:03 PM
Embed Pictures in Workbook John Wilson Excel Programming 3 April 10th 04 08:06 PM


All times are GMT +1. The time now is 06:03 AM.

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

About Us

"It's about Microsoft Excel"