Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Initiating a Macro
I would like to initiate a macro when a cell has a specific value or
satisfies a formula (e.g. AB). Is that possible? Thanks in advance. JS |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Initiating a Macro
Hi,
You could use the worksheet change event. Right click your sheet tab, view code and paste this in Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub If Target.Address = "$A$1" Then If IsNumeric(Target) Then On Error Resume Next Application.EnableEvents = False If Target.Value Range("B1").Value Then 'do your thing End If Application.EnableEvents = True On Error GoTo 0 End If End If End Sub Now if A1 changes to a value greater than B1 you can run some code. Mike "Setts" wrote: I would like to initiate a macro when a cell has a specific value or satisfies a formula (e.g. AB). Is that possible? Thanks in advance. JS |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Initiating a Macro
More detail. Any cell, specific cell, before/after
-- Don Guillett Microsoft MVP Excel SalesAid Software "Setts" wrote in message ... I would like to initiate a macro when a cell has a specific value or satisfies a formula (e.g. AB). Is that possible? Thanks in advance. JS |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
need help to update macro to office 2007 macro enabled workbook | Excel Discussion (Misc queries) | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
Macro: automatically initiating upon cell click | Excel Discussion (Misc queries) | |||
initiating a macro | Excel Worksheet Functions |