Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calling VB from Excel
I would like to call a VB module (exe or dll) from Execl
passing the workbook. Cannot figure out how the passing of the parameter to the exe-module is done. How to code the VB module accepting the parameter. The VBA-call I assume is of standard format but how do I get on the exe- module |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calling VB from Excel
I assume that you're talking VB6
Read up on command line variables. In the Exe create an Excel Application object & then you can grab the name from the passed parameter and open the workbook from the excel object as normal from HELP... Command Function Returns the argument portion of the command line used to launch Visual Basic or an executable program developed with Visual Basic. Public Function Command() As StringRemarks For applications developed with Visual Basic and compiled to an .exe file, the Command function returns any arguments that appear after the name of the application on the command line, as in this example: MyApp cmdlineargsExample This example uses the Command function to return the command-line arguments in an object containing an array. Function GetCommandLineArgs() As String() ' Declare variables. Dim separators As String = " " Dim commands As String = Microsoft.VisualBasic.Command() Dim args() As String = commands.Split(separators.ToCharArray) Return args End Function -- Patrick Molloy Microsoft Excel MVP --------------------------------- I Feel Great! --------------------------------- "Ingvar" wrote in message ... I would like to call a VB module (exe or dll) from Execl passing the workbook. Cannot figure out how the passing of the parameter to the exe-module is done. How to code the VB module accepting the parameter. The VBA-call I assume is of standard format but how do I get on the exe- module |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calling a VB.NET exe/dll from excel | Excel Programming | |||
Calling Excel from C++ | Excel Programming | |||
Calling a Fortran dll from Excel | Excel Programming | |||
Calling an Excel Addin from VBA | Excel Programming | |||
Calling a function from within EXCEL | Excel Programming |