[AccessD] Is it Possible to Have a Variable in a VBA "CALL" Statement?

William Benson vbacreations at gmail.com
Fri Jan 27 14:37:26 CST 2012


Correction:  Eval()

Darned "smart" phone!
On Jan 27, 2012 3:36 PM, "William Benson" <vbacreations at gmail.com> wrote:

> Brad,
>
> Look at application.run or evaluate().
>  On Jan 27, 2012 3:23 PM, "Brad Marks" <BradM at blackforestltd.com> wrote:
>
>> 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
>>
>


More information about the AccessD mailing list