Calling VBA Function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi! I'm trying to 'ask' Excel to Beep evrytime a condition turns TRUE. For
example, every time cell A3 equals 10, beep. I did a Sub Noise () in VBA so I
could call that Sub in that If statement but how can I do it?

Thanks
 
Put the code below in the worksheet code module. Do this by right-clicking
on the sheet tab, and select view code. Then paste this:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$3" And Target.Value = 10 Then Beep
End Sub
 

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

Similar Threads

Excel VBA help: Text file formatting 19
How to tell when Beep sound is done? 2
slow macto 2
index function in vba 3
Excel VBA 1
Re: VBA Runs After Application.Quit 11
Alarm 2 2
Disable Cut/Copy/Paste in Excel 2010 0

Back
Top