Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Integrating a VB App with Excel 1

Status
Not open for further replies.

VBRookie

Programmer
May 29, 2001
331
US
Hi,

I have successfully integrated Excel with my VB app by displaying the automation server inside of a frame as opposed to using an OLE control.

I've disabled all of the menu items in Excel and placed a save button on the form so the user can only manipulate it through the VB app.

I'm using the following code to bring up the 'Save As' dialog box when they click save:

Code:
With mxlApp.CommandBars("Worksheet Menu Bar")
     .Controls("File").Controls("Save As...").Execute
End With

The problem is that when I click save the application disappears although it's still running. I have to click on it from the menu bar to make it the active window again. When it comes back into view the Save As dialog is there but how do I stop the app from going into the background or hiding itself when I click on save?

Any help would be greatly appreciated. Thanks.
- VBRookie
 
Consider this:

activewindow.visible=true

If this doesn't work email me we can try something else.....possibly using the prevent save as routine I have or taking control of the Application.Dialogs command options.
email me at drat@mediaone.net if you want to talk.
:)
Ratman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top