Salakhetdinov Shamil
mcp2004 at mail.ru
Fri Jan 27 15:27:26 CST 2012
Hi Brad -- You can consider one of the three options: 1. Function Eval(StringExpr As String) Member of Access.Application 2 Function Run(Procedure As String, [Arg1], [Arg2], [Arg3], [Arg4], [Arg5], [Arg6], [Arg7], [Arg8], [Arg9], [Arg10], [Arg11], [Arg12], [Arg13], [Arg14], [Arg15], [Arg16], [Arg17], [Arg18], [Arg19], [Arg20], [Arg21], [Arg22], [Arg23], [Arg24], [Arg25], [Arg26], [Arg27], [Arg28], [Arg29], [Arg30]) Member of Access.Application 3. Function CallByName(Object As Object, ProcName As String, CallType As VbCallType, Args() As Variant) Member of VBA.Interaction Thank you. -- Shamil 28 января 2012, 00:23 от "Brad Marks" <BradM at blackforestltd.com>: > All, > > I am experimenting with building a generic routine that will in turn > call other routines based on a variable. > > The following statement works nicely of course. > > Call Report100_Compound_Filters > > However, I would like to able to do something like shown below so that I > can plug in the first part of the name (such as "Report100") > > DIM MySub as String > > Dim MyReport as String > > MyReport = "Report100" > > MySub = MyReport & "_Compound_Filters" > > CALL MySub > > ~~~~~~~~~~~~~~~~~~~~~ > > This CALL does not work, but I thought that perhaps there is some sort > of method to accomplish this with VBA. > > Thanks, > > Brad > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >