+ Reply to Thread
Results 1 to 2 of 2

How to execute a excel subroutine from visual basic

  1. #1
    Ivan Lozada
    Guest

    How to execute a excel subroutine from visual basic

    Hello There,

    How do I execute, say the Excel Public Sub Sub_1(msg as string), subroutine
    from a Visual Basic 6.0 Program?

    Thanks,
    Ivan

  2. #2
    Chip Pearson
    Guest

    Re: How to execute a excel subroutine from visual basic

    Assuming you have a variable in your VB6 program that references
    the Excel Application, you can use the Run method to execute the
    sub. E.g,.

    XLApp.Run "workbookname.xls!Sub_1", "Msg"


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com


    "Ivan Lozada" <IvanLozada@discussions.microsoft.com> wrote in
    message
    news:B52D3ED6-2861-4287-90DE-3EC079385C0A@microsoft.com...
    > Hello There,
    >
    > How do I execute, say the Excel Public Sub Sub_1(msg as
    > string), subroutine
    > from a Visual Basic 6.0 Program?
    >
    > Thanks,
    > Ivan




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1