Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling a function dynamically like macro substitution i
Message
 
À
28/04/2001 02:04:08
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00501193
Message ID:
00501218
Vues:
22
>I have a function called InList.
>The syntax is :-
>
>Private Function InList(strSearched As Variant, ParamArray ArraySearchFor()) As Boolean
> Dim strSearchFor As Variant
>
> For Each strSearchFor In ArraySearchFor
> If strSearched = strSearchFor Then InList = True: Exit Function
> Next strSearchFor
>End Function
>
>I have a string having the values of array which have to be passed as search values to the above function i.e. strSearchFor = "'2','3','7'"
>
>How can i call this function in my code?

Something like this:
if InList("'2'",split(strSearchFor,",")) then ...
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform