troubleshooting Question

Split String into smaller chunks

Avatar of Pigdogmonster
Pigdogmonster asked on
ASPVB Script
5 Comments1 Solution409 ViewsLast Modified:
hi - thanks for looking at my question.

I am printing to labels using VBscript and would like to change a string to handle this.
I have a string that will be no more than 50 chars.

I would like to split the string into 4 smaller strings.

varMainString="17*140 TORUS SKIRT 2.4M 4PCS (12) PEFC MIN 70% EAN"

varString1="17*140 TORUS"
varString2="SKIRT 2.4M 4PCS"
varString3="(12) PEFC MIN "
varString4="70% EAN"

No string can be more than 15 chars (inc spaces) or the line will not be printed and I would like to always have 4 strings even if they are blank.

Please see the attached scan and this will give you an idea of what I would like.

Thanks in advance


"Batchelor", Developer and EE Topic Advisor
Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros