Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Auto run macro
Hi Masters
I Have a macros telling if cell B2 is not blank clear contents in cell B3 Sub remvpw() If Range("b2") = "1234" Then Range("b3").Select Selection.ClearContents End If End Sub But i can run the macro only by view macros I want to auto run whenever i insert anything in the cell B2 Plz help Thnxs Bakar |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto run macro
On Monday, October 29, 2012 5:21:47 AM UTC-5, Bakar wrote:
Hi Masters I Have a macros telling if cell B2 is not blank clear contents in cell B3 Sub remvpw() If Range("b2") = "1234" Then Range("b3").Select Selection.ClearContents End If End Sub But i can run the macro only by view macros I want to auto run whenever i insert anything in the cell B2 Plz help Thnxs Bakar -- Bakar put this macro into the worksheet module Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = Range("b2").Address Then Range("b3").Clear End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Auto Run a Macro | Excel Programming | |||
Sub Macro vrs Function Macro Auto Start | Excel Discussion (Misc queries) | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
Auto-run macro after auto-query refresh (Excel2000,sr1) | Excel Programming | |||
Macro Auto Run(2) | Excel Worksheet Functions |