Assign Sub Name to a Variable
Hi Alan,
Not that I'm aware of, but you could pass the variable instead?........
Sub FirstProcedure()
Dim ProductName As String
Call ProcessingProcedure(ProductName)
End Sub
Sub ProcessingProcedure(ByVal ProductName As String)
Select Case ProductName
Case "Cat"
'Code here
Case "Dog"
'Code here
Case "Mouse"
'Code here
Case Else
'Code here
End Select
End Sub
Hope that helps
Best regards
John
"Alan" wrote in message
ups.com...
If a string variable "ProductName" can have one of 10 values assigned
to it, is it possible to call a subroutine whose name is the same as
the value of the variable?? If so, can you supply an example please.
|