Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to import VBA modules generated by another application into
Excel. That is, I want to create the module as ordinary text file using VC++. I exported a module created in the VB Editor (opened from Excel Tools|Macros menu) just to see what it looked like. When I open it in a text editor (e.g., Notepad) I see the following: ' Declare myFunct as a C++ function in a DLL Private Declare Function myFunct Lib "myDLL.dll" _ (ByRef inArgs As Double, ByRef outArgs As Double) As Long 'Define a Sub that calls myFunct Sub myFunctDriver() Attribute myFunctDriver.VB_ProcData.VB_Invoke_Func = "m\n14" <----- WHAT IS THIS??? Dim inArgs(1) As Double, outArgs(1) As Double Dim ec inArgs(0) = ThisWorkbook.Worksheets("WS1").Range("b6").Value 'x inArgs(1) = ThisWorkbook.Worksheets("WS1").Range("b9").Value 'y ec = myFunct(inArgs(0), outArgs(0)) If ec = 0 Then ThisWorkbook.Worksheets("WS1").Range("h4").Value = outArgs(2) 'z ThisWorkbook.Worksheets("WS1").Range("h5").Value = outArgs(1) 'w End If End Sub This is exactly what I see in the VB Editor with the exception of the noted line (<----- WHAT IS THIS???). Since I did not type it, VBA must have inserted it, but hides it from view in the VBA IDE. Where does VB get the "m\n14" string? Is it just an arbitrary unique string for each defined function? TIA Ed |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Puzzling attribute | Excel Discussion (Misc queries) | |||
Formatting Attribute Hierarchies | Excel Discussion (Misc queries) | |||
Cannot remove Read Only Attribute | Excel Discussion (Misc queries) | |||
Cannot remove read only attribute | Excel Discussion (Misc queries) | |||
Read Only attribute disappears | Excel Discussion (Misc queries) |