External signal to active VBA Macro in Excel

Hello guys!

I have looked in the forum, but didn't find any topic about this subject so I'm starting one.
Mr. andycr have helped me a lot in something I'm trying to develop in the Autorun Macro topic I opened, but even if the target is still the same, the question is other, so I'm starting another topic.

Well no more delays, get to the matter.

I'm now looking for a way to create an external signal to VBA programming, I mean for example, create a signal in C++ program to send a information to VBA, does anyone knows if it is possible?

How I'll create the signal to send I can find out, but I don't really know how can VBA receive an external signal in live time (as soon as it's sent). Not even know it it is possible, but if there is a way I would like to know.

I really appreciate the attention and further help of all!
Best regards!

Is your C++ program an XLL,

Is your C++ program an XLL, or is it external to Excel? If it's an XLL, you should be able to run a public VBA function as though it was a worksheet function (I've a feeling it's the CALL function in XLL).

Chris

Hi Chris, thanks for your

Hi Chris, thanks for your attention and sorry for taking so long to answer!

To be honest I really don't have a specific program for programing, I just would like to know if there is a way of an external program access the VBA in excel.

You mentioned about the possibility of a VBA function calling XLL, but for that to work it is necessary to run a macro with the CALL function right? What I really need is a way of an external information start the macro...

But I really appreciate your help,
Best regards!

It's a bit difficult to help

It's a bit difficult to help without more info, but generally you should find that VBA in Excel will be callable from outside Excel. You'll need to get a handle on the running session of Excel (using COM or such like) and then you should be able to access the Excel OM and execute whatever routine it is you want.

Depending on what you're after, it might be much easier to have something running in Excel on a timer (Application.OnTime in VBA) which checks your conditions, rather than having something external to Excel pushing notifications in.

Thanks for the help!

I really appreciate your attention!

Although I didn't gave much information the objective is to somehow create an external entry to start a macro in VBA.
I considered using the OnTime function, but in my case it won't work, because my macro take some information from other software and send to other sheet, my problem is that when this information get to my excel it won't active the Change function, so I need a way to create an external "start".
I know that with this information it may be hard to give me an answer, but I also don't have any idea of how activate my macro after all data get to excel...
I may try to use some conditions on the OnTime function, but until now I didn't succeed in doing this!

Well once again, thank you for your attention and help,
Best regards!