Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running a macro when a cell value changes
Norm,
:You may want to check your system clock unless xmas is already passed for you. -- Don Guillett SalesAid Software "Norman Jones" wrote in message ... 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/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Running a macro from currently selected cell? | Excel Discussion (Misc queries) | |||
Running macro from currently selected cell? | Excel Discussion (Misc queries) | |||
Running macro depending on cell value | Excel Worksheet Functions | |||
Running Macro when a cell value changes | Excel Discussion (Misc queries) | |||
Macro running when a cell is exited | Excel Discussion (Misc queries) |