|
-
Feb 12th, 2012, 03:17 PM
#1
[RESOLVED] Ontime from class module
Does anybody know how to run a macro using OnTime in Excel VBA that's in a class module rather than in a standard code module?
Or, alternatively, to pass parameters to the proc?
In summary, I am looking to run scheduled tasks out of a class module. I can run a given proc, but if there are multiple instances of the class active then the proc won't know which one has called it. So either I need to tell OnTime to call a proc within its own class or I need to pass a parameter to the proc to tell it which instance of the class did the scheduling.
I could use a dictionary to look up the schedule time and affiliate that to a class ID, but I'd rather do something a bit more concrete, ie definitively associate a specific class instance with the code that runs.
The only other option I can think of is to create it in VSTO and run it through there.
Thoughts?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|