Excel macro needs to run a VB.NET application

Posted on 2003-03-10
Medium Priority
Last Modified: 2010-04-07
I have a VB.NET application that generates an excel sheet and puts a macro button in the excel application that is generated. The data on the excel sheet is manipulated by the user. Once the data is updated (mainpulated) the user clicks the macro button that was generated by the VB.NET app. This button / macro needs to call another VB.NET app that updates the changed data on the Excel sheet to the Database. I am able to generate the excel macro button but do not know how to execute the VB.NET app from this button / macro. Does anyone have any code or alternate method to accomplish this.

Thanks a million
Question by:marthand
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

Accepted Solution

JoaTex earned 800 total points
ID: 8105055

Suposing your Macro is Named Jump and your aplication is calculator from Windows Here is the code:

Dim Res
Sub Jump()
On Error GoTo ErrorHandler
    Res = Shell("C:\Windows\Calc.exe")
    Exit Sub
    MsgBox "Error!", 64, "Update Sheet"
End Sub

Hope it Suites you

Expert Comment

ID: 8900394
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
LVL 49

Expert Comment

ID: 9074668
Moderator, my recommended disposition is:

    Accept JoaTex's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

800 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