Is it possible to call a procedure using the contents of a variable as the name of the procedure? Kinda of like this
Dim StrProcedure as String
Call StrProcedure
The reason I'm trying to do this is because I've got a monster Select...Case statement that I'd like to get wrid of. It's for a security module that checks the group a user belongs to(There are 18) and what stage a document is at(i.e. Pending Director's Approval)(There are 10). Looks something like this:
Select Case Group
Case 1
Select Case Stage
Case Pending Director
Call Procedure1
End Select
Case 2
Select Case Stage
Case Pending Senior Director
Call Procedure2
End Select
etc..
If anyone could help on this, or suggest an alternate way of trimming the Select...Case down, I'd greatly appreciate it.
Dim StrProcedure as String
Call StrProcedure
The reason I'm trying to do this is because I've got a monster Select...Case statement that I'd like to get wrid of. It's for a security module that checks the group a user belongs to(There are 18) and what stage a document is at(i.e. Pending Director's Approval)(There are 10). Looks something like this:
Select Case Group
Case 1
Select Case Stage
Case Pending Director
Call Procedure1
End Select
Case 2
Select Case Stage
Case Pending Senior Director
Call Procedure2
End Select
etc..
If anyone could help on this, or suggest an alternate way of trimming the Select...Case down, I'd greatly appreciate it.