E
Eddie's Bakery and Cafe'
Hi, I am trying to assign a variable the address of a collection object. I
want to use one several possible collections in an argument list. When I try
to assign the variable the address of the collection I get a compile error,
“Argument not Optionalâ€
Here a code sample:
Private Function foo (level As GetRecipeLevel, …) As Boolean
Dim PKeyAddr As Collection
With myCollectionList
Select Case level
Case MenuCategoryLevel
PKeyAddr = .MenuCategory ' Collection Object of Menu Category
Names
Case RecipeTypeLevel
PKeyAddr = .RecipeType ' Collection Object of Recipe Type
Names
Case RecipeCategoryLevel
PKeyAddr = .RecipeCategory ' Collection Object of Recipe
Category Names
Case RecipeNameLevel
PKeyAddr = .RecipenName ' Collection Object of Recipe Names
End Select
End With
Call GetPrimaryKey (PKeyAddr)
End Function
want to use one several possible collections in an argument list. When I try
to assign the variable the address of the collection I get a compile error,
“Argument not Optionalâ€
Here a code sample:
Private Function foo (level As GetRecipeLevel, …) As Boolean
Dim PKeyAddr As Collection
With myCollectionList
Select Case level
Case MenuCategoryLevel
PKeyAddr = .MenuCategory ' Collection Object of Menu Category
Names
Case RecipeTypeLevel
PKeyAddr = .RecipeType ' Collection Object of Recipe Type
Names
Case RecipeCategoryLevel
PKeyAddr = .RecipeCategory ' Collection Object of Recipe
Category Names
Case RecipeNameLevel
PKeyAddr = .RecipenName ' Collection Object of Recipe Names
End Select
End With
Call GetPrimaryKey (PKeyAddr)
End Function