Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell value Change Event - Need to activate macro
Hello:
I have a problem similar to the timed macro question earlier. I have a macro which I need to activate automaticalluy (without user intrervention) whenever the value of a cell changes (For example - clear the contents of a specific range where the results would go). Any help would be appreciated thanks manda |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell value Change Event - Need to activate macro
What causes the value of the cell to change?
Is it a DDE linked cell? Is it a formula? Is a selection from a listbox causing the change (then what about using the change event of the listbox?) What version of Excel? Details would be important. Also, if it is a listbox selection triggering the change, then what help do you need? -- Regards, Tom Ogilvy "Listbox use in Excel" wrote in message ... Hello: I have a problem similar to the timed macro question earlier. I have a macro which I need to activate automaticalluy (without user intrervention) whenever the value of a cell changes (For example - clear the contents of a specific range where the results would go). Any help would be appreciated thanks manda |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell value Change Event - Need to activate macro
Hi Tom:
Thanks. I have a list box that a user slects from and I do several simple automated (excel fomula calculations that happen quickly). This is the first part of the result. The second part of the result requires some deeper calculaitons that require a macro to run. After the macro runs the second part of the result is "UPDATED". My problem is that the user is looking at the "OLD" part 2 of the result UNTIL he/she clicks the Button to activate the macro. As a minimum I want the user to see blank cells before the new result (part 2) is displayed. SO - it is not a DDE cell I am using Excel 2003 I actually have 6 listboxes and as soon as the user makes selection in each of the 6 boxes, I get the Part 1 of the result show up almost instantly (which is nice). However, If I hook the macro (for part2) to eachof the listboxes, the process becomes very slow - because EACH list box invokes the macro. I looked at the "Change event" thread , but I did not understand how to code "if the cell value changed from before" Thank you for your help manda "Tom Ogilvy" wrote: What causes the value of the cell to change? Is it a DDE linked cell? Is it a formula? Is a selection from a listbox causing the change (then what about using the change event of the listbox?) What version of Excel? Details would be important. Also, if it is a listbox selection triggering the change, then what help do you need? -- Regards, Tom Ogilvy "Listbox use in Excel" wrote in message ... Hello: I have a problem similar to the timed macro question earlier. I have a macro which I need to activate automaticalluy (without user intrervention) whenever the value of a cell changes (For example - clear the contents of a specific range where the results would go). Any help would be appreciated thanks manda |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell value Change Event - Need to activate macro
Perhaps you need to modify the macro so you have 6 part 2 macros specific to
the change in each listbox. Then leave it hooked. Or, you can hook it to the listboxes and it will fire each time, but the macro will check the value of each of the listboxes and exit until it finds all 6 have been adjusted - then it will actually do the work. Other than that, your explanation is still a bit too vague. As far at the part 2 results, clear those cells and have the macro update them when it runs. for information on the Change event for a cell value, see Chip Pearson's page on events http://www.cpearson.com/excel/events.htm -- Regards, Tom Ogilvy "Listbox use in Excel" wrote in message ... Hi Tom: Thanks. I have a list box that a user slects from and I do several simple automated (excel fomula calculations that happen quickly). This is the first part of the result. The second part of the result requires some deeper calculaitons that require a macro to run. After the macro runs the second part of the result is "UPDATED". My problem is that the user is looking at the "OLD" part 2 of the result UNTIL he/she clicks the Button to activate the macro. As a minimum I want the user to see blank cells before the new result (part 2) is displayed. SO - it is not a DDE cell I am using Excel 2003 I actually have 6 listboxes and as soon as the user makes selection in each of the 6 boxes, I get the Part 1 of the result show up almost instantly (which is nice). However, If I hook the macro (for part2) to eachof the listboxes, the process becomes very slow - because EACH list box invokes the macro. I looked at the "Change event" thread , but I did not understand how to code "if the cell value changed from before" Thank you for your help manda "Tom Ogilvy" wrote: What causes the value of the cell to change? Is it a DDE linked cell? Is it a formula? Is a selection from a listbox causing the change (then what about using the change event of the listbox?) What version of Excel? Details would be important. Also, if it is a listbox selection triggering the change, then what help do you need? -- Regards, Tom Ogilvy "Listbox use in Excel" wrote in message ... Hello: I have a problem similar to the timed macro question earlier. I have a macro which I need to activate automaticalluy (without user intrervention) whenever the value of a cell changes (For example - clear the contents of a specific range where the results would go). Any help would be appreciated thanks manda |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell value Change Event - Need to activate macro
Hi Tom: thank you for your patience
I will follow your suggestion. The tool I am building is trying to do the following: There are two sheets in the Workbook The first sheet has raw data arranged in rows (e.g. 3000 rows each with 100 data points across). The second sheet is the User interaction page where we have 6 list boxes for the user to specify 6 parameters. Based on these 6 values we calculate the ROW number that the user needs (from the data page) We get the data from this Row and Compute statistics (such as average, standard deviation etc) . These statistics are displayed as PART 1 of the RESULT section in the "USER INTERACTION PAGE " (where the list boxes are). We still need to display PART 2 of the Results section. This part is not easily expressed as a formula. So we need a macro to compute the values we need. The macro computes these values using an algorithm. These computed values can be displayed in the PART 2 of the RESULT section -- using a command button. The problem withthis approach is this: When the user makes the selction in thelist boxes, Excel displays part 1 immediately - without user intervention. However, PART2 is still showing "OLD" results (from previous user selection and previous invocation of the macro). What I was hoping to do is to clear the contents of the PART 2 whenever, the listboxes selection changes. I like your suggestion of having a different macro to clear PART2 and to hook it up to each listbox, and I think it would be fast enough (better than hooking up to the macro that does the calculations). Thanks manda "Tom Ogilvy" wrote: Perhaps you need to modify the macro so you have 6 part 2 macros specific to the change in each listbox. Then leave it hooked. Or, you can hook it to the listboxes and it will fire each time, but the macro will check the value of each of the listboxes and exit until it finds all 6 have been adjusted - then it will actually do the work. Other than that, your explanation is still a bit too vague. As far at the part 2 results, clear those cells and have the macro update them when it runs. for information on the Change event for a cell value, see Chip Pearson's page on events http://www.cpearson.com/excel/events.htm -- Regards, Tom Ogilvy "Listbox use in Excel" wrote in message ... Hi Tom: Thanks. I have a list box that a user slects from and I do several simple automated (excel fomula calculations that happen quickly). This is the first part of the result. The second part of the result requires some deeper calculaitons that require a macro to run. After the macro runs the second part of the result is "UPDATED". My problem is that the user is looking at the "OLD" part 2 of the result UNTIL he/she clicks the Button to activate the macro. As a minimum I want the user to see blank cells before the new result (part 2) is displayed. SO - it is not a DDE cell I am using Excel 2003 I actually have 6 listboxes and as soon as the user makes selection in each of the 6 boxes, I get the Part 1 of the result show up almost instantly (which is nice). However, If I hook the macro (for part2) to eachof the listboxes, the process becomes very slow - because EACH list box invokes the macro. I looked at the "Change event" thread , but I did not understand how to code "if the cell value changed from before" Thank you for your help manda "Tom Ogilvy" wrote: What causes the value of the cell to change? Is it a DDE linked cell? Is it a formula? Is a selection from a listbox causing the change (then what about using the change event of the listbox?) What version of Excel? Details would be important. Also, if it is a listbox selection triggering the change, then what help do you need? -- Regards, Tom Ogilvy "Listbox use in Excel" wrote in message ... Hello: I have a problem similar to the timed macro question earlier. I have a macro which I need to activate automaticalluy (without user intrervention) whenever the value of a cell changes (For example - clear the contents of a specific range where the results would go). Any help would be appreciated thanks manda |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
when I activate a cell i change color of active row & header from | Excel Worksheet Functions | |||
Cell Activate Event | Excel Programming | |||
Return to Current Sheet in On (sheet activate) event macro | Excel Programming | |||
Change Cell from Validated List Not Firing Worksheet Change Event | Excel Programming | |||
Activate event | Excel Programming |