LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default What is VB_Invoke_Func attribute?

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
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
Puzzling attribute Bony Pony[_3_] Excel Discussion (Misc queries) 0 February 22nd 10 05:09 PM
Formatting Attribute Hierarchies John Excel Discussion (Misc queries) 0 August 20th 07 09:24 PM
Cannot remove Read Only Attribute Richard Hollister Excel Discussion (Misc queries) 6 April 20th 07 04:26 PM
Cannot remove read only attribute Colin Gough Excel Discussion (Misc queries) 2 September 27th 06 12:37 AM
Read Only attribute disappears Ken G. Excel Discussion (Misc queries) 1 December 2nd 04 12:32 AM


All times are GMT +1. The time now is 05:13 AM.

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

About Us

"It's about Microsoft Excel"