Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro to write other macros?
I have the following simple macro:
Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Range("Conditions"), Target) Is Nothing Then Call FormatConditions(Target) End If End Sub Is it possible to write a macro that adds this to the code module of all worksheets? Darren |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro to write other macros?
Hi Darren
Yes. http://www.cpearson.com/excel/vbe.htm But there is a Workbook_SheetChange in ThisWorkbook, which is a common Worksheet_Change event for all worksheets in the workbook. I'd use that. HTH. Best wishes Harald "Darren Hill" skrev i melding news:op.sq1a21a5ed89cl@omega... I have the following simple macro: Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Range("Conditions"), Target) Is Nothing Then Call FormatConditions(Target) End If End Sub Is it possible to write a macro that adds this to the code module of all worksheets? Darren |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to write macros | Excel Discussion (Misc queries) | |||
is it possible to execute write to the fields in another .xsl form a macro in another .xsl? e.g. some way to load another .xsl into an .xsl macro and write to its data? | Excel Worksheet Functions | |||
Can you freely write excel macros in C# yet? | Excel Programming | |||
write error - even when no macros run | Excel Programming | |||
Macros that write data to a new spreadsheet? | Excel Programming |