Here is the CopyMemory page on msdn. You can see that the actual dll entry point is called RtlMoveMemory, and if you scroll down to the bottom, you can see that the dll is Kernel32. The function returns
void
, so in VBA it's declared as a
Sub
. The arguments are both void pointers, so as long as you pass an address, it doesn't matter how you do it.