Hello All,
My First Post but trust a freaking long time user.
OK so this is a new one for me and I always seem to get the fun stuff.
I have a simple Excel VBA Workbook program that has worked fine up till now just using its internal calculations. However, recently a rigorous program that calculates the same values but with more accuracy as I do in my VBA workbook has added a API to its install. Problem is it is in VB.NET. VBA and VB.NET do not play well with one another and the VBA Interopt would require VisualStudio.NET as well as learning VB.NET. So my code is still out of luck to communicate to the program. OR IS IT, Bwahahahaha!
As part of the Rigorous Program install, they deliver a API Excel Tool Workbook. Of course there is no code seen, due to it being in VB.NET and written using Visual Studio.NET. BUT I have a working Excel VB.NET workbook that interfaces the rigorous app and if I can populate my VBA workbook information into that Excel file, run the VB.NET workbook app, and read back the results into my VBA program then life would be golden.
The first problem was opening the demo. When it opens, it auto connects to the rigorous app. When it does this it prompts the user "that it is connecting to the application" then needs a user input to push the OK button. Thus, already a problem because the code locks up till the user pushes OK. So my first solution - Application.DisplayAlerts = False. This VBA code, however, does not work for the VB.NET creation, and I assume it is because VBA and VB.NET do not mix and the code simply gets ignored
So to get past this I run the .NET workbook from a VBA programmed shell command and open the VB.NET workbook in a second instance of Excel, then use WINDOWS API to click the OK button. This worked like a champ.
Problem now is I am trying to send values from my Excel VBA program in one instance of Excel to another instance of Excel that is running the VB.NET workbook.
So how can I connect to the opened second instance of Excel and place my values into it. Heck, I wish I did not need the second instance of Excel and get the two combined into a single instance again, however, there does not seem to be a way to do this.
I am open to any suggestions.
Thanks
My First Post but trust a freaking long time user.

OK so this is a new one for me and I always seem to get the fun stuff.
I have a simple Excel VBA Workbook program that has worked fine up till now just using its internal calculations. However, recently a rigorous program that calculates the same values but with more accuracy as I do in my VBA workbook has added a API to its install. Problem is it is in VB.NET. VBA and VB.NET do not play well with one another and the VBA Interopt would require VisualStudio.NET as well as learning VB.NET. So my code is still out of luck to communicate to the program. OR IS IT, Bwahahahaha!
As part of the Rigorous Program install, they deliver a API Excel Tool Workbook. Of course there is no code seen, due to it being in VB.NET and written using Visual Studio.NET. BUT I have a working Excel VB.NET workbook that interfaces the rigorous app and if I can populate my VBA workbook information into that Excel file, run the VB.NET workbook app, and read back the results into my VBA program then life would be golden.
The first problem was opening the demo. When it opens, it auto connects to the rigorous app. When it does this it prompts the user "that it is connecting to the application" then needs a user input to push the OK button. Thus, already a problem because the code locks up till the user pushes OK. So my first solution - Application.DisplayAlerts = False. This VBA code, however, does not work for the VB.NET creation, and I assume it is because VBA and VB.NET do not mix and the code simply gets ignored

So to get past this I run the .NET workbook from a VBA programmed shell command and open the VB.NET workbook in a second instance of Excel, then use WINDOWS API to click the OK button. This worked like a champ.
Problem now is I am trying to send values from my Excel VBA program in one instance of Excel to another instance of Excel that is running the VB.NET workbook.
So how can I connect to the opened second instance of Excel and place my values into it. Heck, I wish I did not need the second instance of Excel and get the two combined into a single instance again, however, there does not seem to be a way to do this.
I am open to any suggestions.
Thanks