Hello VBA lovers
I Have wrote a simple code in java and i would very much like to be able to use it in ms access.
Could someone translate it in vba please.
I know it will be easy for most of the ppeople programming in VBA, cose it has only two loopes and some string variables.
So I would really much appreciate if you can help me.
here is the code writen i java:

I Have wrote a simple code in java and i would very much like to be able to use it in ms access.
Could someone translate it in vba please.
I know it will be easy for most of the ppeople programming in VBA, cose it has only two loopes and some string variables.
So I would really much appreciate if you can help me.
here is the code writen i java:
Code:
[LEFT][COLOR=blue]Public[/COLOR] class mod36 {
[COLOR=blue]Public[/COLOR] static void main ([COLOR=blue]String[/COLOR] [] arg){
[COLOR=blue]String[/COLOR] _sIn = "GYM014650000005";
[COLOR=blue]String[/COLOR] sCharPool = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
String[] sArrayIn = [COLOR=blue]New[/COLOR] [COLOR=blue]String[/COLOR] [15];
char c;
[COLOR=blue]For[/COLOR] (int i = 0; i < 15; i++){
c = _sIn.charAt(i);
sArrayIn[i] = Character.toString(c);
}
int iSum = 0;
[COLOR=blue]For[/COLOR] (int iCount = 0; iCount < 15; iCount++) {
iSum = iSum + sCharPool.indexOf(sArrayIn[iCount].toUpperCase()) * (16 - iCount);
}
int iCtrl = iSum % 36;
System.out.println ("rez: " + _sIn + sCharPool.substring(iCtrl, iCtrl + 1));
}} [/LEFT]