Link to home
Start Free TrialLog in
Avatar of Gite
GiteFlag for Canada

asked on

How to call a perl function from Access VBA

I want to call a function written in Perl that parses a string and returns the result as another string.

My access code will go through a database and will call that perl function for each record found in the db. The access code will then store the result into another field in the db record.

I need to know if there is a special way to write that function in perl and to declare and call it in my vba program. Thanks
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

i don't think that is possible, however, you can create a function using VBA in access to do the same..
ASKER CERTIFIED SOLUTION
Avatar of Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
<<Access has very powerful string manipulating and parsing capabilities. I think it would probably be easier to create VBA code to do the same thing the PERL script does.  

NOTE: You can use regular expressions in VBA code. >>

 That was going to be my suggestion; seems like it woul dbe far simpler to re-do the logic in VBA then trying to call PERL.

 Lot's of VBA string manipulation code floating around already and as you said, regular expressions are available.

 See:

https://www.experts-exchange.com/Programming/Languages/Visual_Basic/A_1336-Using-Regular-Expressions-in-Visual-Basic-for-Applications-and-Visual-Basic-6.html

Jim.