View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.programming
[email protected][_2_] bart.smissaert@gmail.com[_2_] is offline
external usenet poster
 
Posts: 39
Default Request Guidance on Visual Basic Versions

On Jan 4, 8:33*am, joel wrote:
Your code only works because of the StrPtr function which is not
documented in VBA. *And it is weird that you have to specify that Strptr
yo need to pass using Byval instead of the default ByRef. *I wouldn't
use Any as the variable type of the pointers instead I would use LONG
since a pointer is really a long in VBA.

The Strptr() function basically skips the header that VBA put infront
of a variable which contains the Variable type and number of characters.
If yo uwere using VB6 yo can specify the compiling option and use
C-Language variable passing instead of the Microsoft Standard variable
passing.

Again it is easier and clearer to write this code in C-language than in
VBA.

--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread:http://www.thecodecage.com/forumz/sh...d.php?t=166356

Microsoft Office Help



I use the Windows API a lot in VBA (and VB6) and never had any problem
at all, but
we are now completely off the original topic of this thread. I doubt
very much that learning
C is the answer to the OP's question.

RBS