Hi guys,

I'm not sure this is doable, but I thought I'd ask anyway. Also, it's possibly more to do with VBA than VB6, but it's both really.

Let's say I've got a CheckBox on an Excel Worksheet. Easy enough. I click it, and it might run some VBA code.

Now, I also want to check it through VB6 automation. However, this time, I don't want it to run any VBA code (or, at least, not the same code).

So, here's the question: From VBA, is there a way to know if Excel is being automated via VB6 versus just VBA macros running because of user interaction?

I suppose I could reach into the VBA from VB6 and set a flag, but I'd rather not do that. Also, I suppose I could also have a second CheckBox tucked away on some Excel tab(worksheet) somewhere and use it as a flag (which I'll do unless there's a more nifty answer).

Thanks,
Elroy