User Defined type as Sub parameter?

P

plh

I would have thought this would be OK:

Dim NewOrder As udtNewOrder
'In the public area. udtNewOrder is a User Defined Type

With NewOrder
...
...
...
RecalculateRawMaterial (NewOrder)
...
...
...
End With

Sub RecalculateRawMaterial(udtNO As udtNewOrder)

'DoSomething

End Sub

But I get: "Type Mismatch"

I seemed to recall there was something funny about udt's as parameters, but
damned if I can recall...
Thank You,
-plh
 
P

plh

I would have thought this would be OK:

Dim NewOrder As udtNewOrder
'In the public area. udtNewOrder is a User Defined Type

With NewOrder
...
...
...
RecalculateRawMaterial (NewOrder)

C-A-L-L RecalculateRawMaterial (NewOrder)
As my daughter would say, "Duhuh!"
-plh
 
D

Dave Peterson

If you do:

With NewOrder
RecalculateRawMaterial NewOrder
End With

or
With NewOrder
Call RecalculateRawMaterial(NewOrder)
End With

does it work ok?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top