Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Running a macro when a cell value changes

How can I run a macro called "sounds", when a value within a spreadshee
ie: cell A1 goes over a pre-defined value, located in another cell (sa
a2)?

I have tried but am failing

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Running a macro when a cell value changes

Hi Don,

"Don Guillett" wrote:
:You may want to check your system clock unless xmas is already passed for
you.


Thank you .

A couple of weeks back my clock was off for a couple of hours - the result
of some injudicious system experimentation.

As for Xmas, I find that it has (almost) always passed for me!


---
Regards,
Norman


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Running a macro when a cell value changes

Hi Emea,

If the Sounds macro is in a standard module in the workbook,

Right-click the worksheet tab, select View Code and paste the following:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Range("A1"), Target) Is Nothing Then
If Range("A1").Value Range("A2").Value Then
Sounds
End If
End If
End Sub

---
Regards,
Norman


"Emea training " wrote in
message ...
How can I run a macro called "sounds", when a value within a spreadsheet
ie: cell A1 goes over a pre-defined value, located in another cell (say
a2)?

I have tried but am failing!


---
Message posted from http://www.ExcelForum.com/



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
Running a macro from currently selected cell? GD Excel Discussion (Misc queries) 1 February 10th 09 05:11 PM
Running macro from currently selected cell? GD Excel Discussion (Misc queries) 1 February 10th 09 04:54 PM
Running macro depending on cell value Esradekan Excel Worksheet Functions 2 January 29th 08 07:03 PM
Running Macro when a cell value changes Ayo Excel Discussion (Misc queries) 1 April 18th 07 03:09 PM
Macro running when a cell is exited Daniel Lees Excel Discussion (Misc queries) 1 July 20th 05 02:45 PM


All times are GMT +1. The time now is 05:43 PM.

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"