Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run MACRO from the valve of a cell?
Does anyone know if I can run a MACRO from the value of a cell?
If cell "A1" is greater the 42 I would like to either close the worksheet with out saving or protect if from any more changes. -- Francis X. Boudreaux |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run MACRO from the valve of a cell?
Hi
you'll need an event procedure for this. See: http://www.cpearson.com/excel/events.htm -- Regards Frank Kabel Frankfurt, Germany FX Boudreaux wrote: Does anyone know if I can run a MACRO from the value of a cell? If cell "A1" is greater the 42 I would like to either close the worksheet with out saving or protect if from any more changes. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run MACRO from the valve of a cell?
You will need an onsheet event.
Right click the sheet tab, view code. Put this macro into the sheet module Sub Doobee() set a=range("A1") if a.value 42 then activeworkbook.close false 'changes not saved end if end sub Regards Mark -----Original Message----- Does anyone know if I can run a MACRO from the value of a cell? If cell "A1" is greater the 42 I would like to either close the worksheet with out saving or protect if from any more changes. -- Francis X. Boudreaux |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
'IF' Macro to insert cell contents to alternate cell if cell not e | Excel Worksheet Functions | |||
Convert cell value from a formula to a valve on save | Excel Discussion (Misc queries) | |||
using a cell value to control a counter inside a macro and displaying macro value | Excel Worksheet Functions | |||
How to pass valve in combobox object to cell | Excel Programming | |||
Question: Cell formula or macro to write result of one cell to another cell | Excel Programming |