Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can a macro be self-starting based on some event?
Events such as: 1) opening the file 2) preset time 3) value of certain cell contents Trying to set a spreadsheet to run a series of queries and macros every night. Also hope to learn if i can set up a series of queries and macros to run in sequence whether autostart or not. Could these macros run even if the Excel file is not open? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
#1. You can use a sub named: Auto_Open (placed in a General module)
or you can use the Workbook_Open event in the ThisWorkbook module. #2. You can use application.ontime to start a macro when you want. Chip Pearson shows how: http://www.cpearson.com/excel/OnTime.aspx #3. If the value changes because of the user typing something, you can use the worksheet_change. If the value changes because of a formula recalculating, you can use the worksheet_calculate event. If you're new to macros: Debra Dalgleish has some notes how to implement macros he http://www.contextures.com/xlvba01.html David McRitchie has an intro to macros: http://www.mvps.org/dmcritchie/excel/getstarted.htm Ron de Bruin's intro to macros: http://www.rondebruin.nl/code.htm (General, Regular and Standard modules all describe the same thing.) Chip Pearson has some instructions on events: http://www.cpearson.com/excel/events.htm David McRitchie has some notes, too: http://www.mvps.org/dmcritchie/excel/event.htm There are application events, too. You can read more about application events at Chip Pearson's site: http://www.cpearson.com/excel/AppEvent.aspx Delivery wrote: Can a macro be self-starting based on some event? Events such as: 1) opening the file 2) preset time 3) value of certain cell contents Trying to set a spreadsheet to run a series of queries and macros every night. Also hope to learn if i can set up a series of queries and macros to run in sequence whether autostart or not. Could these macros run even if the Excel file is not open? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Autostart macro-protect file | Excel Programming | |||
Autostart Macro | Excel Discussion (Misc queries) | |||
Autostart | Excel Discussion (Misc queries) | |||
Delete an autostart Sub with code | Excel Programming | |||
Autostart | Excel Programming |