sean262123
02-26-2011, 12:49 AM
Hello,
I need to figure out how to write a VBA addin to provide continual updates to the Active Worksheet as the user goes about his business inputting values.
The workbook doesn't have (or at least doesn't start) with any macros in it...it all has to be run out of the addin.
There are two lines of thought I've been thinking of:
1) Allow user to start addin as a menu item, and put addin's vba code in a loop. Problem is I haven't found a way to let the worksheet be updated while a macro is running. I tried application.wait - blocked user events. I tried DoEvents but the loop seemed to self terminate whenever the worksheet changed.
2) If there was a way to tie the Addin to worksheet change events. Haven't written a .com Addin yet but I read that may do it, would this be a successful route? Is it the only route?
I need to figure out how to write a VBA addin to provide continual updates to the Active Worksheet as the user goes about his business inputting values.
The workbook doesn't have (or at least doesn't start) with any macros in it...it all has to be run out of the addin.
There are two lines of thought I've been thinking of:
1) Allow user to start addin as a menu item, and put addin's vba code in a loop. Problem is I haven't found a way to let the worksheet be updated while a macro is running. I tried application.wait - blocked user events. I tried DoEvents but the loop seemed to self terminate whenever the worksheet changed.
2) If there was a way to tie the Addin to worksheet change events. Haven't written a .com Addin yet but I read that may do it, would this be a successful route? Is it the only route?