Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling a VB.NET exe/dll from excel Rui Dias Excel Programming 0 August 11th 04 05:44 PM
Calling Excel from C++ GL[_2_] Excel Programming 1 August 9th 04 09:15 PM
Calling a Fortran dll from Excel Tom Kreutz Excel Programming 0 November 15th 03 06:56 PM
Calling an Excel Addin from VBA ABN Excel Programming 2 July 31st 03 02:33 PM
Calling a function from within EXCEL pcor[_2_] Excel Programming 3 July 18th 03 05:10 PM


All times are GMT +1. The time now is 09:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"