[simpits-tech] VB Code to strip digits apart

Ken Trager simpits-tech@simpits.org
Tue, 18 Feb 2003 17:06:15 -0500


And the winner is - - - - - - - - - - - - - -

GENE

You are the KING!!!!

Your little five lines worked like a charm!!!!!!

Thanks so much

Ken Trager



> > I still th8ink mine was the best.  It converts an integer (what you'd get
> > from FSUIPC to a string that is "transmittable" to an external device.
> > Ken!  Ruling! :)
> >
> > g.
> >
> >
> > On Tue, 18 Feb 2003, Erwin Neyt wrote:
> >
> > > Aha, a four-liner :) Good work Jeroen.
> > >
> > > Anyone going for less!?
> > >
> > > Erwin.
> > >
> > > > -----Original Message-----
> > > > From: Jeroen Huijben [mailto:jeroen_huijben@hotmail.com]
> > > > Sent: dinsdag 18 februari 2003 10:26
> > > > To: simpits-tech@simpits.org
> > > > Subject: Re: [simpits-tech] VB Code to strip digits apart
> > > >
> > > >
> > > > How about:
> > > >
> > > > Dim intDigit (9) as Integer
> > > > Dim intNumber as Integer
> > > > Dim intCount as Integer
> > > >
> > > > Sub funStripDigits
> > > >
> > > > intCount = 10
> > > > intNumber = Val(txtTextbox)
> > > >
> > > > While intCount > 0
> > > >   intCount = intCount - 1
> > > >   intDigit (intCount) = intNumber \ (10^intCount)
> > > >   intNumber = intNumber Mod (10^intCount)
> > > > Whend
> > > >
> > > > End Sub
> > > >
> > > > \ tells you how many times A goes fully into B.
> > > >   5 \ 2 would give 2.
> > > > Mod tells you how much remains after you've taken A fully out
> > > > of B as often
> > > > as possible.
> > > >   5 mod 2 would give 1.
> > > >
> > > > _________________________________________________________________
> > > > Help STOP SPAM with the new MSN 8 and get 2 months FREE*
> > > > http://join.msn.com/?page=features/junkmail
> > > >
> > > > _______________________________________________
> > > > Simpits-tech mailing list
> > > > Simpits-tech@simpits.org
> > > > http://www.simpits.org/mailman/listinfo/simpit> s-tech
> > > > To
> > > > unsubscribe, please see the instructions at the
> > > > bottom of the above page.  Thanks!
> > > >
> > >
> > > _______________________________________________
> > > Simpits-tech mailing list
> > > Simpits-tech@simpits.org
> > > http://www.simpits.org/mailman/listinfo/simpits-tech
> > > To unsubscribe, please see the instructions at the bottom of the above
> page.  Thanks!
> > >
> >
> > _______________________________________________
> > Simpits-tech mailing list
> > Simpits-tech@simpits.org
> > http://www.simpits.org/mailman/listinfo/simpits-tech
> > To unsubscribe, please see the instructions at the bottom of the above
> page.  Thanks!
>
> _______________________________________________
> Simpits-tech mailing list
> Simpits-tech@simpits.org
> http://www.simpits.org/mailman/listinfo/simpits-tech
> To unsubscribe, please see the instructions at the bottom of the above page.
> Thanks!
>
> _______________________________________________
> Simpits-tech mailing list
> Simpits-tech@simpits.org
> http://www.simpits.org/mailman/listinfo/simpits-tech
> To unsubscribe, please see the instructions at the bottom of the above page.  Thanks!