Solved

calling a particular VB form from Excel

Posted on 1998-09-08
3
130 Views
Last Modified: 2010-04-30
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.
0
Comment
Question by:cotton
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
brunchey earned 50 total points
ID: 1433593
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
 

Author Comment

by:cotton
ID: 1433594
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
 
LVL 1

Expert Comment

by:brunchey
ID: 1433595
I am not an excel expert, but it should be resonably as quick
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question