Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
plh plh is offline
external usenet poster
 
Posts: 48
Default User Defined type as Sub parameter?

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


--
I keep hitting "Esc" -- but I'm still here!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default User Defined type as Sub parameter?

If you do:

With NewOrder
RecalculateRawMaterial NewOrder
End With

or
With NewOrder
Call RecalculateRawMaterial(NewOrder)
End With

does it work ok?

plh wrote:

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

--
I keep hitting "Esc" -- but I'm still here!


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
plh plh is offline
external usenet poster
 
Posts: 48
Default User Defined type as Sub parameter?

Yes. (Please see my reply to myself!)
Thanx,
-plh

In article , Dave Peterson says...

If you do:

With NewOrder
RecalculateRawMaterial NewOrder
End With

or
With NewOrder
Call RecalculateRawMaterial(NewOrder)
End With

does it work ok?

plh wrote:

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

--
I keep hitting "Esc" -- but I'm still here!




--
I keep hitting "Esc" -- but I'm still here!
  #4   Report Post  
Posted to microsoft.public.excel.programming
plh plh is offline
external usenet poster
 
Posts: 48
Default User Defined type as Sub parameter?


In article , plh says...

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


...
...
...
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




--
I keep hitting "Esc" -- but I'm still here!
Reply
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
Help: Compile error: type mismatch: array or user defined type expected lvcha.gouqizi Excel Programming 1 October 31st 05 08:20 PM
"User-defined type not defined" message in Excel RW1946 Excel Discussion (Misc queries) 0 August 31st 05 12:14 PM
Workspace faux user-defined type not defined Chris S[_2_] Excel Programming 3 November 11th 04 05:51 PM
User-defined data type; Error: Only User-defined types... tiger_PRM Excel Programming 1 July 18th 04 03:32 PM
Word.Document - user defined type not defined jowatkins[_7_] Excel Programming 0 January 20th 04 08:46 AM


All times are GMT +1. The time now is 08:41 PM.

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"