Parm Not Getting Passed?

P

PeteCresswell

I'm at my wit's end on this one.

Hopefully I'm just doing something teminally stupid and not seeing it.

When I pass some parms on the stack to a subroutine, they are not
getting through.

Specific example is something I call "IssueDate", which is a variant
on both ends, but
comes through to the subroutine as "Empty".

viz:
-----------------------------------------------------------------------------------------
http://tinyurl.com/5trmol (screen snap of calling routine)

http://tinyurl.com/59nt7n (screen snap of subroutine)
-----------------------------------------------------------------------------------------

I've /Decompiled, Compact-And-Repaired, and re-booted my PC,
but the problem persists.

Anybody see anything obvious in the code?
 
P

PeteCresswell

It sb added that I'm passing those parms on the stack.

When I change to ByRef, they seem to come through a-ok.

??
 
D

Dirk Goldgar

PeteCresswell said:
I'm at my wit's end on this one.

Hopefully I'm just doing something teminally stupid and not seeing it.

When I pass some parms on the stack to a subroutine, they are not
getting through.

Specific example is something I call "IssueDate", which is a variant
on both ends, but
comes through to the subroutine as "Empty".

viz:
-----------------------------------------------------------------------------------------
http://tinyurl.com/5trmol (screen snap of calling routine)

http://tinyurl.com/59nt7n (screen snap of subroutine)
-----------------------------------------------------------------------------------------

I've /Decompiled, Compact-And-Repaired, and re-booted my PC,
but the problem persists.

Anybody see anything obvious in the code?


There may or may not be a problem, but your screenshots don't show one.
Strings, objects, and (I conclude) variants aren't actually passed on the
stack. Instead, a local copy is made of the argument. As you enter the
called procedure and the procedure header is the current line (as
highlighted in your second screenshot), these local copies of the arguments
have not been assigned yet a value yet. If you step forward to the next
line in the called procedure, then you'll see whether the values you've
passed are there in the arguments.
 
Top