Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there any way to automatically run a macro in excel based on the value of
a cell in that workbook? i.e. the value changes from 0 to 1 = run macro. Anyone have a copy of code that does this? Using VBA and don't have full blown VB - thanks!!!! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi JD
You can use the change event http://www.cpearson.com/excel/events.htm Here is a example of the change event that run a macro http://www.rondebruin.nl/mail/change.htm -- Regards Ron de Bruin http://www.rondebruin.nl -- Regards Ron de Bruin http://www.rondebruin.nl "JD" wrote in message ... Is there any way to automatically run a macro in excel based on the value of a cell in that workbook? i.e. the value changes from 0 to 1 = run macro. Anyone have a copy of code that does this? Using VBA and don't have full blown VB - thanks!!!! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ron,
You're a genius!!!!! Works like a charm - I'll test it out on the full production system in the morning, but, no doubt will work fine. Many thanks!!! "Ron de Bruin" wrote: Hi JD You can use the change event http://www.cpearson.com/excel/events.htm Here is a example of the change event that run a macro http://www.rondebruin.nl/mail/change.htm -- Regards Ron de Bruin http://www.rondebruin.nl -- Regards Ron de Bruin http://www.rondebruin.nl "JD" wrote in message ... Is there any way to automatically run a macro in excel based on the value of a cell in that workbook? i.e. the value changes from 0 to 1 = run macro. Anyone have a copy of code that does this? Using VBA and don't have full blown VB - thanks!!!! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How is the value going to change?
If by editing manually, can we assume that if the cell is edited, the macro should run. (if it had a value of 2 and it still had a value of 2 after editing, should the macro run?). -- Regards, Tom Ogilvy "JD" wrote in message ... Is there any way to automatically run a macro in excel based on the value of a cell in that workbook? i.e. the value changes from 0 to 1 = run macro. Anyone have a copy of code that does this? Using VBA and don't have full blown VB - thanks!!!! |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom,
Thanks for the reply. The value is updated every second using the built in database query tools. The database is MS SQL - if that has any bearing. Basically this discrete value is originates in a controller for a production line and should drive a macro that pulls in data from three different databases and then prints a report. All automatic - thus the dilemma. The macro and database connectivity all works and I can manually run the macro to generate the report and print - just need this last piece. Any ideas? "Tom Ogilvy" wrote: How is the value going to change? If by editing manually, can we assume that if the cell is edited, the macro should run. (if it had a value of 2 and it still had a value of 2 after editing, should the macro run?). -- Regards, Tom Ogilvy "JD" wrote in message ... Is there any way to automatically run a macro in excel based on the value of a cell in that workbook? i.e. the value changes from 0 to 1 = run macro. Anyone have a copy of code that does this? Using VBA and don't have full blown VB - thanks!!!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Autorun macro | Excel Discussion (Misc queries) | |||
Autorun macro | Excel Worksheet Functions | |||
Autorun Add-In | Excel Programming | |||
Excel Macro Issue Trying to autorun Macro Upon Opening Worksheet | Excel Programming | |||
AutoRun an Excel Workbook when CD-ROM is inserted; Help! | Excel Programming |