Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run code based on cell contents
Hi,
I am stuck!! Is there a piece of code that will allow a macro to run based on cel contents. For example i would like a piece of code to run and loop while th value in cell A1 equals 1 But stop if the value equals 2. Regards Pet -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run code based on cell contents
Thank you that was really useful to know, but is there a way i can ge
the code to run without attaching it to a button. So if i type 1 into cell A1 and press enter the macro wil automatically run? Regards Pet -- Message posted from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run code based on cell contents
Pete
Check out Event procedures at David McRitchie's site http://www.mvps.org/dmcritchie/excel/event.htm Or at Chip Pearson's site http://www.cpearson.com/excel/events.htm Event code will fire when you enter something(1 or 2) into A1 Gord Dibben Excel MVP On Tue, 22 Jun 2004 11:17:19 -0500, Pete JM wrote: Thank you that was really useful to know, but is there a way i can get the code to run without attaching it to a button. So if i type 1 into cell A1 and press enter the macro will automatically run? Regards Pete --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
code to unhide tabs based on cell contents | Excel Worksheet Functions | |||
VBA code to copy cell contents from one sheet to another | Excel Worksheet Functions | |||
Code to hide rows based on cell contents | Excel Programming | |||
How to validate in code the contents of a cell? | Excel Programming | |||
run code after cell contents change | Excel Programming |