Pictures n' music

S

Stevrford

Does anyone know if there's a way to link the result of a formul
calculation with a picture and/or music?
For example: I have a Lookup function that scans an array of values an
then displays the words "Excellent", or "Poor" depending upon th
result of a calculation from a formula in another cell.
I'd like to make it so that when the word "excellent" is displayed,
picture of a man holding a trophy pops up in an adjacent cell. And I'
also like to make the theme from Rocky play as well, if that'
possible. I already have the picturen and the midi file of the Rock
theme stored on my hard drive, but I just don't know how (or even if
can) link the picture and music to the result of the formula. An
thoughts?

Stevrford:confused
 
J

JerryG

Stevrford,

Since it didn't look like anyone was jumping on your question, I gave
it a go and came up with some limited success. You can try to play
with this a bit and see if you can come up with results more closely
suited to what you want. I inserted a wave sound object and put this
macro on the sheet containing your formula. This macro runs anytime
your worksheet autocalculates and assumes the formula is in cell A1:

Private Sub Worksheet_Calculate()
If Range("A1").Value = "Excellent" Then
ActiveSheet.Shapes("Object 1").Select
Selection.Verb Verb:=xlPrimary
ActiveCell.Select
End If
End Sub

The wave sound object seemed to react the best, although you can try it
with different object types (video clip or media clip). The last line
of the If...Then statement, ActiveCell.Select, moves focus back to your
spreadsheet and off the object. But with objects other than the wave
sound, it stopped the playing time almost immediately, so comment out
that line if you want to experiment with other objects.

I looked at several methods of hidding an image and unhidding it within
the above macro, but not sure I was getting anything close to what you
want. Many different options here, just not sure what you were really
looking for.

Hope this helps and is not too late. Reply back if you need any
clarification or further assistance with any of this.

JerryG :)
 
S

Stevrford

Jerry G,
Pardon me for sounding naive, but when you start talking about macros,
I'm still a fledgling user... most other functions with excel I'm
familiar with, but macros are still a bit of a mystery to me. i've only
done one or two, and those are very short.
Is there any way you could talk me thru it?

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top