calling a particular VB form from Excel

I have a vb5 program that opens up an existing xl spreadsheet (ie, we are not in the vb shell anymore). However, I then want to return to vb and call up either form 1 or 2 in the vb shell, depending on what the user does in Excel. I have tried to put the hwnd value of both VB forms into excel when it loads, but excel only returns to the active VB window.
cottonAsked:
Who is Participating?
 
bruncheyCommented:
You might have to create more of an object-oriented way of doing this.  Try getting, or giving, a reference to excel of the actual VB application by making it an activex.exe and having publicly creatable objects.  But make sure that it is of the current instance of the application.  Then have two different methods that will allow provide the functionality that you are trying to incorporate.  
0
 
cottonAuthor Commented:
Thanks for such a prompt response, you have made me think about the problem in a different way. I'm working with heavy maths - would calling the DLL from Excel be as fast as VB compiled?
0
 
bruncheyCommented:
I am not an excel expert, but it should be resonably as quick
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.