PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 1.00 average.

Custom VBA Code

 
 
Little Penny
Guest
Posts: n/a
 
      29th Sep 2007
I'm trying to create a code that will produce the following results.

First the user will need to provide basic information.
Job quantity
First Piece
Group size
Job Number


The "Group Size" breaks the "Job Quantity" up into group size chucks.
For example if the "Job Quantity" is 14524 and the "Group Size" is
3000 we would get four groups of 3000 and one group of 2524


Example 1



Job Quantity = 14524
First Piece = 1
Group Size = 3000
Job Number = A12345


Code will produce:

A B C D E
GroupID START END QTY Group BAR CODE
S0001 1 3000 3000 *S1001+1+3000+A12345*
S0002 3001 6000 3000 *S1002+3001+3000+A12345*
S0003 6001 9000 3000 *S1003+6001+3000+A12345*
S0004 9001 12000 3000 *S1004+9001+3000+A12345*
S0005 12001 14524 2524 *S1005+12001+2524+A12345*


As you can see a "*" is added at the beginning and end in column E.
Also everything is separated by a "+" sign. This format is import
because it will be read by a scanner.



Example 2

In this example the first piece 2541



Job Quantity = 18233
First Piece = 2541
Group Size = 2500
Job Number = A12345


Code will produce:

A B C D E
GroupID START END QTY Group BAR CODE
S0001 2541 5040 2500 *S1001+2541+2500+B12345*
S0002 5041 7540 2500 *S1002+5041+2500+B12345*
S0003 7541 10040 2500 *S1003+7541+2500+B12345*
S0004 10041 12540 2500 *S1004+10041+2500+B12345*
S0005 12541 15040 2500 *S1005+12541+2500+B12345*
S0006 15041 17540 2500 *S1006+15041+2500+B12345*
S0007 17541 20040 2500 *S1007+17541+2500+B12345*
S0008 20041 20773 733 *S1008+20041+733+B12345*





Column E which is the Group Bar code should use the bar code font
"CarolinaBar-B39-2.5-22x158x720"

I hope I explained the right.


Where do I start?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?Sm9lbA==?=
Guest
Posts: n/a
 
      29th Sep 2007
Hi Penny. I will be glad to help like in the past. I found the website on
Carolina Bar code the linnk is below.

http://carolinabarcode.com

I downloaded the excel example which gives the method for printing the bar
codes and generating the bar code with the required CRC. I've worked with
Bar codes befroe so I have a good understainding of how to generte the codes.
MY Electrical Engineering and math background has given plenty of classroom
work to be pretty much an expert on generating codes.

I'm not usre from your description if you are having problems figuring out
how to generate the codes of just combining columns A - D into E. Column E
is just a cobination of the field A-D.

I used the download function from the Carolina Website and used this formula
to get your results

Cell E1
=bc3of9(A1&B1&D1&"B12345")

Cell F1 - add the plus signs into string
=LEFT(E1,6)&"+"&MID(E1,7,4)&"+"&MID(E1,11,4)&"+"&RIGHT(E1,7)

The function BC3of9 converts the character to proper format and places the *
at the beginning and end. The Plus signs are not part of the Bar code and
are added only to make it easier to read the numbers.

"Little Penny" wrote:

> I'm trying to create a code that will produce the following results.
>
> First the user will need to provide basic information.
> Job quantity
> First Piece
> Group size
> Job Number
>
>
> The "Group Size" breaks the "Job Quantity" up into group size chucks.
> For example if the "Job Quantity" is 14524 and the "Group Size" is
> 3000 we would get four groups of 3000 and one group of 2524
>
>
> Example 1
>
>
>
> Job Quantity = 14524
> First Piece = 1
> Group Size = 3000
> Job Number = A12345
>
>
> Code will produce:
>
> A B C D E
> GroupID START END QTY Group BAR CODE
> S0001 1 3000 3000 *S1001+1+3000+A12345*
> S0002 3001 6000 3000 *S1002+3001+3000+A12345*
> S0003 6001 9000 3000 *S1003+6001+3000+A12345*
> S0004 9001 12000 3000 *S1004+9001+3000+A12345*
> S0005 12001 14524 2524 *S1005+12001+2524+A12345*
>
>
> As you can see a "*" is added at the beginning and end in column E.
> Also everything is separated by a "+" sign. This format is import
> because it will be read by a scanner.
>
>
>
> Example 2
>
> In this example the first piece 2541
>
>
>
> Job Quantity = 18233
> First Piece = 2541
> Group Size = 2500
> Job Number = A12345
>
>
> Code will produce:
>
> A B C D E
> GroupID START END QTY Group BAR CODE
> S0001 2541 5040 2500 *S1001+2541+2500+B12345*
> S0002 5041 7540 2500 *S1002+5041+2500+B12345*
> S0003 7541 10040 2500 *S1003+7541+2500+B12345*
> S0004 10041 12540 2500 *S1004+10041+2500+B12345*
> S0005 12541 15040 2500 *S1005+12541+2500+B12345*
> S0006 15041 17540 2500 *S1006+15041+2500+B12345*
> S0007 17541 20040 2500 *S1007+17541+2500+B12345*
> S0008 20041 20773 733 *S1008+20041+733+B12345*
>
>
>
>
>
> Column E which is the Group Bar code should use the bar code font
> "CarolinaBar-B39-2.5-22x158x720"
>
> I hope I explained the right.
>
>
> Where do I start?
>

 
Reply With Quote
 
Little Penny
Guest
Posts: n/a
 
      29th Sep 2007

Hi Joel

Thanks for you replay

I have a spreadsheet that does what I have described. What I was
trying to do is recreate what it does using VBA code. It gives much
more flexibility for other things down the road. I can email you a
sample of my spreadsheet if you like. But my main focus was to
recreate what my spreadsheet formulasdo using VBA

I will start by asking the user


Ask1:
jnumber = Application.InputBox("Job Number", Title:="Job Number",
Type:=1)
If jnumber = False Then

End If

Ask2:
fpiece = Application.InputBox("Enter first piece", Title:="First
Piece", Type:=1)
If fpiece = False Then
End If

Ask3:
Jquanity = Application.InputBox("Enter Job quanity", Title:="Job
Quanity", Type:=1)
If Jquanity = False Then
End If


Ask4:
gsize = Application.InputBox("Enter group quanity", Title:="Group
Quanity", Type:=1)
If gsize = False Then

End If

Can I email you my spreadsheet?




















On Sat, 29 Sep 2007 12:16:00 -0700, Joel
<(E-Mail Removed)> wrote:

>Hi Penny. I will be glad to help like in the past. I found the website on
>Carolina Bar code the linnk is below.
>
>http://carolinabarcode.com
>
>I downloaded the excel example which gives the method for printing the bar
>codes and generating the bar code with the required CRC. I've worked with
>Bar codes befroe so I have a good understainding of how to generte the codes.
> MY Electrical Engineering and math background has given plenty of classroom
>work to be pretty much an expert on generating codes.
>
>I'm not usre from your description if you are having problems figuring out
>how to generate the codes of just combining columns A - D into E. Column E
>is just a cobination of the field A-D.
>
>I used the download function from the Carolina Website and used this formula
>to get your results
>
>Cell E1
>=bc3of9(A1&B1&D1&"B12345")
>
>Cell F1 - add the plus signs into string
>=LEFT(E1,6)&"+"&MID(E1,7,4)&"+"&MID(E1,11,4)&"+"&RIGHT(E1,7)
>
>The function BC3of9 converts the character to proper format and places the *
>at the beginning and end. The Plus signs are not part of the Bar code and
>are added only to make it easier to read the numbers.
>
>"Little Penny" wrote:
>
>> I'm trying to create a code that will produce the following results.
>>
>> First the user will need to provide basic information.
>> Job quantity
>> First Piece
>> Group size
>> Job Number
>>
>>
>> The "Group Size" breaks the "Job Quantity" up into group size chucks.
>> For example if the "Job Quantity" is 14524 and the "Group Size" is
>> 3000 we would get four groups of 3000 and one group of 2524
>>
>>
>> Example 1
>>
>>
>>
>> Job Quantity = 14524
>> First Piece = 1
>> Group Size = 3000
>> Job Number = A12345
>>
>>
>> Code will produce:
>>
>> A B C D E
>> GroupID START END QTY Group BAR CODE
>> S0001 1 3000 3000 *S1001+1+3000+A12345*
>> S0002 3001 6000 3000 *S1002+3001+3000+A12345*
>> S0003 6001 9000 3000 *S1003+6001+3000+A12345*
>> S0004 9001 12000 3000 *S1004+9001+3000+A12345*
>> S0005 12001 14524 2524 *S1005+12001+2524+A12345*
>>
>>
>> As you can see a "*" is added at the beginning and end in column E.
>> Also everything is separated by a "+" sign. This format is import
>> because it will be read by a scanner.
>>
>>
>>
>> Example 2
>>
>> In this example the first piece 2541
>>
>>
>>
>> Job Quantity = 18233
>> First Piece = 2541
>> Group Size = 2500
>> Job Number = A12345
>>
>>
>> Code will produce:
>>
>> A B C D E
>> GroupID START END QTY Group BAR CODE
>> S0001 2541 5040 2500 *S1001+2541+2500+B12345*
>> S0002 5041 7540 2500 *S1002+5041+2500+B12345*
>> S0003 7541 10040 2500 *S1003+7541+2500+B12345*
>> S0004 10041 12540 2500 *S1004+10041+2500+B12345*
>> S0005 12541 15040 2500 *S1005+12541+2500+B12345*
>> S0006 15041 17540 2500 *S1006+15041+2500+B12345*
>> S0007 17541 20040 2500 *S1007+17541+2500+B12345*
>> S0008 20041 20773 733 *S1008+20041+733+B12345*
>>
>>
>>
>>
>>
>> Column E which is the Group Bar code should use the bar code font
>> "CarolinaBar-B39-2.5-22x158x720"
>>
>> I hope I explained the right.
>>
>>
>> Where do I start?
>>

 
Reply With Quote
 
=?Utf-8?B?RlN0MQ==?=
Guest
Posts: n/a
 
      29th Sep 2007
hi
this work on both of your examples
I assumed that all your job would be in the same columns and that you would
be just adding to them.

Sub Macro1()
Dim jq As Long 'job qty
Dim jqm As Long 'job qty minus
Dim jqbr As Long 'job qty run balance
Dim fp As Long 'first piece
Dim gs As Long 'group size
Dim jn As String 'job number
Dim c As Long 'counter
Dim sp As Range 'sheet placement
c = 1

jq = InputBox("Enter the Job quanty.")
fp = InputBox("Enter the first piece quanty.")
gs = InputBox("Enter the qroup size.")
jn = InputBox("Enter the Job Number.")
jq = jq + fp - 1
jqm = jq

Set sp = Cells(65536, 1).End(xlUp).Offset(1, 0)
sp.Select
sp.Value = "S000" & c
c = c + 1
sp.Offset(0, 1).Value = fp
jqrb = jqrb + gs + fp - 1
sp.Offset(0, 2).Value = jqrb
sp.Offset(0, 3).Value = gs
sp.Offset(0, 4).Value = "*" & sp.Value & "+" & _
sp.Offset(0, 1).Value & "+" & _
sp.Offset(0, 3).Value & "+" & jn & "*"
Do While jqm > 0
Set sp = Cells(65536, 1).End(xlUp).Offset(1, 0)
sp.Select
sp.Value = "S000" & c
c = c + 1
fp = fp + gs
sp.Offset(0, 1).Value = fp
If jq - jqrb < gs Then
gs = jq - jqrb
jqrb = jqrb + gs
jqm = jqm = gs
Else
jqrb = jqrb + gs
jqm = jqm - gs
End If
sp.Offset(0, 2).Value = jqrb
sp.Offset(0, 3).Value = gs
sp.Offset(0, 4).Value = "*" & sp.Value & "+" & _
sp.Offset(0, 1).Value & "+" & _
sp.Offset(0, 3).Value & "+" & jn & "*"
Loop

End Sub

regards
FSt1

"Little Penny" wrote:

> I'm trying to create a code that will produce the following results.
>
> First the user will need to provide basic information.
> Job quantity
> First Piece
> Group size
> Job Number
>
>
> The "Group Size" breaks the "Job Quantity" up into group size chucks.
> For example if the "Job Quantity" is 14524 and the "Group Size" is
> 3000 we would get four groups of 3000 and one group of 2524
>
>
> Example 1
>
>
>
> Job Quantity = 14524
> First Piece = 1
> Group Size = 3000
> Job Number = A12345
>
>
> Code will produce:
>
> A B C D E
> GroupID START END QTY Group BAR CODE
> S0001 1 3000 3000 *S1001+1+3000+A12345*
> S0002 3001 6000 3000 *S1002+3001+3000+A12345*
> S0003 6001 9000 3000 *S1003+6001+3000+A12345*
> S0004 9001 12000 3000 *S1004+9001+3000+A12345*
> S0005 12001 14524 2524 *S1005+12001+2524+A12345*
>
>
> As you can see a "*" is added at the beginning and end in column E.
> Also everything is separated by a "+" sign. This format is import
> because it will be read by a scanner.
>
>
>
> Example 2
>
> In this example the first piece 2541
>
>
>
> Job Quantity = 18233
> First Piece = 2541
> Group Size = 2500
> Job Number = A12345
>
>
> Code will produce:
>
> A B C D E
> GroupID START END QTY Group BAR CODE
> S0001 2541 5040 2500 *S1001+2541+2500+B12345*
> S0002 5041 7540 2500 *S1002+5041+2500+B12345*
> S0003 7541 10040 2500 *S1003+7541+2500+B12345*
> S0004 10041 12540 2500 *S1004+10041+2500+B12345*
> S0005 12541 15040 2500 *S1005+12541+2500+B12345*
> S0006 15041 17540 2500 *S1006+15041+2500+B12345*
> S0007 17541 20040 2500 *S1007+17541+2500+B12345*
> S0008 20041 20773 733 *S1008+20041+733+B12345*
>
>
>
>
>
> Column E which is the Group Bar code should use the bar code font
> "CarolinaBar-B39-2.5-22x158x720"
>
> I hope I explained the right.
>
>
> Where do I start?
>

 
Reply With Quote
 
Little Penny
Guest
Posts: n/a
 
      30th Sep 2007
All I can say is WOWWWWWWWWWWWWWWWWWWWWWWW

N F-ing Credible

Thanks

I have just one request the Group ID increase as such...


OLD New
S0001 S0001
S0002 S0002
S0003 S0003
S0004 S0004
S0005 S0005
S0006 S0006
S0007 S0007
S0008 S0008
S0009 S0009
S00010 S0010
S00011 S0011
S00012 S0012
S00013 S0013
S00014 S0014
S00015 S0015

Instead of adding a character it moves to the left.









On Sat, 29 Sep 2007 13:39:02 -0700, FSt1
<(E-Mail Removed)> wrote:

>hi
>this work on both of your examples
>I assumed that all your job would be in the same columns and that you would
>be just adding to them.
>
>Sub Macro1()
>Dim jq As Long 'job qty
>Dim jqm As Long 'job qty minus
>Dim jqbr As Long 'job qty run balance
>Dim fp As Long 'first piece
>Dim gs As Long 'group size
>Dim jn As String 'job number
>Dim c As Long 'counter
>Dim sp As Range 'sheet placement
>c = 1
>
>jq = InputBox("Enter the Job quanty.")
>fp = InputBox("Enter the first piece quanty.")
>gs = InputBox("Enter the qroup size.")
>jn = InputBox("Enter the Job Number.")
>jq = jq + fp - 1
>jqm = jq
>
>Set sp = Cells(65536, 1).End(xlUp).Offset(1, 0)
> sp.Select
> sp.Value = "S000" & c
> c = c + 1
> sp.Offset(0, 1).Value = fp
> jqrb = jqrb + gs + fp - 1
> sp.Offset(0, 2).Value = jqrb
> sp.Offset(0, 3).Value = gs
> sp.Offset(0, 4).Value = "*" & sp.Value & "+" & _
> sp.Offset(0, 1).Value & "+" & _
> sp.Offset(0, 3).Value & "+" & jn & "*"
>Do While jqm > 0
> Set sp = Cells(65536, 1).End(xlUp).Offset(1, 0)
> sp.Select
> sp.Value = "S000" & c
> c = c + 1
> fp = fp + gs
> sp.Offset(0, 1).Value = fp
> If jq - jqrb < gs Then
> gs = jq - jqrb
> jqrb = jqrb + gs
> jqm = jqm = gs
> Else
> jqrb = jqrb + gs
> jqm = jqm - gs
> End If
> sp.Offset(0, 2).Value = jqrb
> sp.Offset(0, 3).Value = gs
> sp.Offset(0, 4).Value = "*" & sp.Value & "+" & _
> sp.Offset(0, 1).Value & "+" & _
> sp.Offset(0, 3).Value & "+" & jn & "*"
>Loop
>
>End Sub
>
>regards
>FSt1
>
>"Little Penny" wrote:
>
>> I'm trying to create a code that will produce the following results.
>>
>> First the user will need to provide basic information.
>> Job quantity
>> First Piece
>> Group size
>> Job Number
>>
>>
>> The "Group Size" breaks the "Job Quantity" up into group size chucks.
>> For example if the "Job Quantity" is 14524 and the "Group Size" is
>> 3000 we would get four groups of 3000 and one group of 2524
>>
>>
>> Example 1
>>
>>
>>
>> Job Quantity = 14524
>> First Piece = 1
>> Group Size = 3000
>> Job Number = A12345
>>
>>
>> Code will produce:
>>
>> A B C D E
>> GroupID START END QTY Group BAR CODE
>> S0001 1 3000 3000 *S1001+1+3000+A12345*
>> S0002 3001 6000 3000 *S1002+3001+3000+A12345*
>> S0003 6001 9000 3000 *S1003+6001+3000+A12345*
>> S0004 9001 12000 3000 *S1004+9001+3000+A12345*
>> S0005 12001 14524 2524 *S1005+12001+2524+A12345*
>>
>>
>> As you can see a "*" is added at the beginning and end in column E.
>> Also everything is separated by a "+" sign. This format is import
>> because it will be read by a scanner.
>>
>>
>>
>> Example 2
>>
>> In this example the first piece 2541
>>
>>
>>
>> Job Quantity = 18233
>> First Piece = 2541
>> Group Size = 2500
>> Job Number = A12345
>>
>>
>> Code will produce:
>>
>> A B C D E
>> GroupID START END QTY Group BAR CODE
>> S0001 2541 5040 2500 *S1001+2541+2500+B12345*
>> S0002 5041 7540 2500 *S1002+5041+2500+B12345*
>> S0003 7541 10040 2500 *S1003+7541+2500+B12345*
>> S0004 10041 12540 2500 *S1004+10041+2500+B12345*
>> S0005 12541 15040 2500 *S1005+12541+2500+B12345*
>> S0006 15041 17540 2500 *S1006+15041+2500+B12345*
>> S0007 17541 20040 2500 *S1007+17541+2500+B12345*
>> S0008 20041 20773 733 *S1008+20041+733+B12345*
>>
>>
>>
>>
>>
>> Column E which is the Group Bar code should use the bar code font
>> "CarolinaBar-B39-2.5-22x158x720"
>>
>> I hope I explained the right.
>>
>>
>> Where do I start?
>>

 
Reply With Quote
 
=?Utf-8?B?RlN0MQ==?=
Guest
Posts: n/a
 
      30th Sep 2007
hi again,
oops. didn't think of that.
read throught the code. 2 PLACES. a line that says....

sp.Value = "S000" & c

replace that line with this....

If Len("S000" & c) > 5 Then
sp.Value = "S00" & c
Else
sp.Value = "S000" & c
End If

that should keep your group ids to 5 characters.

Regards
FSt1

"Little Penny" wrote:

> All I can say is WOWWWWWWWWWWWWWWWWWWWWWWW
>
> N F-ing Credible
>
> Thanks
>
> I have just one request the Group ID increase as such...
>
>
> OLD New
> S0001 S0001
> S0002 S0002
> S0003 S0003
> S0004 S0004
> S0005 S0005
> S0006 S0006
> S0007 S0007
> S0008 S0008
> S0009 S0009
> S00010 S0010
> S00011 S0011
> S00012 S0012
> S00013 S0013
> S00014 S0014
> S00015 S0015
>
> Instead of adding a character it moves to the left.
>
>
>
>
>
>
>
>
>
> On Sat, 29 Sep 2007 13:39:02 -0700, FSt1
> <(E-Mail Removed)> wrote:
>
> >hi
> >this work on both of your examples
> >I assumed that all your job would be in the same columns and that you would
> >be just adding to them.
> >
> >Sub Macro1()
> >Dim jq As Long 'job qty
> >Dim jqm As Long 'job qty minus
> >Dim jqbr As Long 'job qty run balance
> >Dim fp As Long 'first piece
> >Dim gs As Long 'group size
> >Dim jn As String 'job number
> >Dim c As Long 'counter
> >Dim sp As Range 'sheet placement
> >c = 1
> >
> >jq = InputBox("Enter the Job quanty.")
> >fp = InputBox("Enter the first piece quanty.")
> >gs = InputBox("Enter the qroup size.")
> >jn = InputBox("Enter the Job Number.")
> >jq = jq + fp - 1
> >jqm = jq
> >
> >Set sp = Cells(65536, 1).End(xlUp).Offset(1, 0)
> > sp.Select
> > sp.Value = "S000" & c
> > c = c + 1
> > sp.Offset(0, 1).Value = fp
> > jqrb = jqrb + gs + fp - 1
> > sp.Offset(0, 2).Value = jqrb
> > sp.Offset(0, 3).Value = gs
> > sp.Offset(0, 4).Value = "*" & sp.Value & "+" & _
> > sp.Offset(0, 1).Value & "+" & _
> > sp.Offset(0, 3).Value & "+" & jn & "*"
> >Do While jqm > 0
> > Set sp = Cells(65536, 1).End(xlUp).Offset(1, 0)
> > sp.Select
> > sp.Value = "S000" & c
> > c = c + 1
> > fp = fp + gs
> > sp.Offset(0, 1).Value = fp
> > If jq - jqrb < gs Then
> > gs = jq - jqrb
> > jqrb = jqrb + gs
> > jqm = jqm + gs
> > Else
> > jqrb = jqrb + gs
> > jqm = jqm - gs
> > End If
> > sp.Offset(0, 2).Value = jqrb
> > sp.Offset(0, 3).Value = gs
> > sp.Offset(0, 4).Value = "*" & sp.Value & "+" & _
> > sp.Offset(0, 1).Value & "+" & _
> > sp.Offset(0, 3).Value & "+" & jn & "*"
> >Loop
> >
> >End Sub
> >
> >regards
> >FSt1
> >
> >"Little Penny" wrote:
> >
> >> I'm trying to create a code that will produce the following results.
> >>
> >> First the user will need to provide basic information.
> >> Job quantity
> >> First Piece
> >> Group size
> >> Job Number
> >>
> >>
> >> The "Group Size" breaks the "Job Quantity" up into group size chucks.
> >> For example if the "Job Quantity" is 14524 and the "Group Size" is
> >> 3000 we would get four groups of 3000 and one group of 2524
> >>
> >>
> >> Example 1
> >>
> >>
> >>
> >> Job Quantity = 14524
> >> First Piece = 1
> >> Group Size = 3000
> >> Job Number = A12345
> >>
> >>
> >> Code will produce:
> >>
> >> A B C D E
> >> GroupID START END QTY Group BAR CODE
> >> S0001 1 3000 3000 *S1001+1+3000+A12345*
> >> S0002 3001 6000 3000 *S1002+3001+3000+A12345*
> >> S0003 6001 9000 3000 *S1003+6001+3000+A12345*
> >> S0004 9001 12000 3000 *S1004+9001+3000+A12345*
> >> S0005 12001 14524 2524 *S1005+12001+2524+A12345*
> >>
> >>
> >> As you can see a "*" is added at the beginning and end in column E.
> >> Also everything is separated by a "+" sign. This format is import
> >> because it will be read by a scanner.
> >>
> >>
> >>
> >> Example 2
> >>
> >> In this example the first piece 2541
> >>
> >>
> >>
> >> Job Quantity = 18233
> >> First Piece = 2541
> >> Group Size = 2500
> >> Job Number = A12345
> >>
> >>
> >> Code will produce:
> >>
> >> A B C D E
> >> GroupID START END QTY Group BAR CODE
> >> S0001 2541 5040 2500 *S1001+2541+2500+B12345*
> >> S0002 5041 7540 2500 *S1002+5041+2500+B12345*
> >> S0003 7541 10040 2500 *S1003+7541+2500+B12345*
> >> S0004 10041 12540 2500 *S1004+10041+2500+B12345*
> >> S0005 12541 15040 2500 *S1005+12541+2500+B12345*
> >> S0006 15041 17540 2500 *S1006+15041+2500+B12345*
> >> S0007 17541 20040 2500 *S1007+17541+2500+B12345*
> >> S0008 20041 20773 733 *S1008+20041+733+B12345*
> >>
> >>
> >>
> >>
> >>
> >> Column E which is the Group Bar code should use the bar code font
> >> "CarolinaBar-B39-2.5-22x158x720"
> >>
> >> I hope I explained the right.
> >>
> >>
> >> Where do I start?
> >>

>

 
Reply With Quote
 
PY & Associates
Guest
Posts: n/a
 
      30th Sep 2007
What happens when job qty is less than group size please? Just in case!

"Little Penny" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> All I can say is WOWWWWWWWWWWWWWWWWWWWWWWW
>
> N F-ing Credible
>
> Thanks
>
> I have just one request the Group ID increase as such...
>
>
> OLD New
> S0001 S0001
> S0002 S0002
> S0003 S0003
> S0004 S0004
> S0005 S0005
> S0006 S0006
> S0007 S0007
> S0008 S0008
> S0009 S0009
> S00010 S0010
> S00011 S0011
> S00012 S0012
> S00013 S0013
> S00014 S0014
> S00015 S0015
>
> Instead of adding a character it moves to the left.
>
>
>
>
>
>
>
>
>
> On Sat, 29 Sep 2007 13:39:02 -0700, FSt1
> <(E-Mail Removed)> wrote:
>
> >hi
> >this work on both of your examples
> >I assumed that all your job would be in the same columns and that you

would
> >be just adding to them.
> >
> >Sub Macro1()
> >Dim jq As Long 'job qty
> >Dim jqm As Long 'job qty minus
> >Dim jqbr As Long 'job qty run balance
> >Dim fp As Long 'first piece
> >Dim gs As Long 'group size
> >Dim jn As String 'job number
> >Dim c As Long 'counter
> >Dim sp As Range 'sheet placement
> >c = 1
> >
> >jq = InputBox("Enter the Job quanty.")
> >fp = InputBox("Enter the first piece quanty.")
> >gs = InputBox("Enter the qroup size.")
> >jn = InputBox("Enter the Job Number.")
> >jq = jq + fp - 1
> >jqm = jq
> >
> >Set sp = Cells(65536, 1).End(xlUp).Offset(1, 0)
> > sp.Select
> > sp.Value = "S000" & c
> > c = c + 1
> > sp.Offset(0, 1).Value = fp
> > jqrb = jqrb + gs + fp - 1
> > sp.Offset(0, 2).Value = jqrb
> > sp.Offset(0, 3).Value = gs
> > sp.Offset(0, 4).Value = "*" & sp.Value & "+" & _
> > sp.Offset(0, 1).Value & "+" & _
> > sp.Offset(0, 3).Value & "+" & jn & "*"
> >Do While jqm > 0
> > Set sp = Cells(65536, 1).End(xlUp).Offset(1, 0)
> > sp.Select
> > sp.Value = "S000" & c
> > c = c + 1
> > fp = fp + gs
> > sp.Offset(0, 1).Value = fp
> > If jq - jqrb < gs Then
> > gs = jq - jqrb
> > jqrb = jqrb + gs
> > jqm = jqm = gs
> > Else
> > jqrb = jqrb + gs
> > jqm = jqm - gs
> > End If
> > sp.Offset(0, 2).Value = jqrb
> > sp.Offset(0, 3).Value = gs
> > sp.Offset(0, 4).Value = "*" & sp.Value & "+" & _
> > sp.Offset(0, 1).Value & "+" & _
> > sp.Offset(0, 3).Value & "+" & jn & "*"
> >Loop
> >
> >End Sub
> >
> >regards
> >FSt1
> >
> >"Little Penny" wrote:
> >
> >> I'm trying to create a code that will produce the following results.
> >>
> >> First the user will need to provide basic information.
> >> Job quantity
> >> First Piece
> >> Group size
> >> Job Number
> >>
> >>
> >> The "Group Size" breaks the "Job Quantity" up into group size chucks.
> >> For example if the "Job Quantity" is 14524 and the "Group Size" is
> >> 3000 we would get four groups of 3000 and one group of 2524
> >>
> >>
> >> Example 1
> >>
> >>
> >>
> >> Job Quantity = 14524
> >> First Piece = 1
> >> Group Size = 3000
> >> Job Number = A12345
> >>
> >>
> >> Code will produce:
> >>
> >> A B C D E
> >> GroupID START END QTY Group BAR CODE
> >> S0001 1 3000 3000 *S1001+1+3000+A12345*
> >> S0002 3001 6000 3000 *S1002+3001+3000+A12345*
> >> S0003 6001 9000 3000 *S1003+6001+3000+A12345*
> >> S0004 9001 12000 3000 *S1004+9001+3000+A12345*
> >> S0005 12001 14524 2524 *S1005+12001+2524+A12345*
> >>
> >>
> >> As you can see a "*" is added at the beginning and end in column E.
> >> Also everything is separated by a "+" sign. This format is import
> >> because it will be read by a scanner.
> >>
> >>
> >>
> >> Example 2
> >>
> >> In this example the first piece 2541
> >>
> >>
> >>
> >> Job Quantity = 18233
> >> First Piece = 2541
> >> Group Size = 2500
> >> Job Number = A12345
> >>
> >>
> >> Code will produce:
> >>
> >> A B C D E
> >> GroupID START END QTY Group BAR CODE
> >> S0001 2541 5040 2500 *S1001+2541+2500+B12345*
> >> S0002 5041 7540 2500 *S1002+5041+2500+B12345*
> >> S0003 7541 10040 2500 *S1003+7541+2500+B12345*
> >> S0004 10041 12540 2500 *S1004+10041+2500+B12345*
> >> S0005 12541 15040 2500 *S1005+12541+2500+B12345*
> >> S0006 15041 17540 2500 *S1006+15041+2500+B12345*
> >> S0007 17541 20040 2500 *S1007+17541+2500+B12345*
> >> S0008 20041 20773 733 *S1008+20041+733+B12345*
> >>
> >>
> >>
> >>
> >>
> >> Column E which is the Group Bar code should use the bar code font
> >> "CarolinaBar-B39-2.5-22x158x720"
> >>
> >> I hope I explained the right.
> >>
> >>
> >> Where do I start?
> >>



 
Reply With Quote
 
Little Penny
Guest
Posts: n/a
 
      30th Sep 2007
Thanks again

The new addition work but only up to 99

Example



S0095
S0096
S0097
S0098
S0099
S00100
S00101
S00102
S00103


After 99 it changes to 6 digits.


Thanks




On Sat, 29 Sep 2007 16:38:01 -0700, FSt1
<(E-Mail Removed)> wrote:

>hi again,
>oops. didn't think of that.
>read throught the code. 2 PLACES. a line that says....
>
>sp.Value = "S000" & c
>
>replace that line with this....
>
>If Len("S000" & c) > 5 Then
> sp.Value = "S00" & c
> Else
> sp.Value = "S000" & c
>End If
>
>that should keep your group ids to 5 characters.
>
>Regards
>FSt1
>
>"Little Penny" wrote:
>
>> All I can say is WOWWWWWWWWWWWWWWWWWWWWWWW
>>
>> N F-ing Credible
>>
>> Thanks
>>
>> I have just one request the Group ID increase as such...
>>
>>
>> OLD New
>> S0001 S0001
>> S0002 S0002
>> S0003 S0003
>> S0004 S0004
>> S0005 S0005
>> S0006 S0006
>> S0007 S0007
>> S0008 S0008
>> S0009 S0009
>> S00010 S0010
>> S00011 S0011
>> S00012 S0012
>> S00013 S0013
>> S00014 S0014
>> S00015 S0015
>>
>> Instead of adding a character it moves to the left.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Sat, 29 Sep 2007 13:39:02 -0700, FSt1
>> <(E-Mail Removed)> wrote:
>>
>> >hi
>> >this work on both of your examples
>> >I assumed that all your job would be in the same columns and that you would
>> >be just adding to them.
>> >
>> >Sub Macro1()
>> >Dim jq As Long 'job qty
>> >Dim jqm As Long 'job qty minus
>> >Dim jqbr As Long 'job qty run balance
>> >Dim fp As Long 'first piece
>> >Dim gs As Long 'group size
>> >Dim jn As String 'job number
>> >Dim c As Long 'counter
>> >Dim sp As Range 'sheet placement
>> >c = 1
>> >
>> >jq = InputBox("Enter the Job quanty.")
>> >fp = InputBox("Enter the first piece quanty.")
>> >gs = InputBox("Enter the qroup size.")
>> >jn = InputBox("Enter the Job Number.")
>> >jq = jq + fp - 1
>> >jqm = jq
>> >
>> >Set sp = Cells(65536, 1).End(xlUp).Offset(1, 0)
>> > sp.Select
>> > sp.Value = "S000" & c
>> > c = c + 1
>> > sp.Offset(0, 1).Value = fp
>> > jqrb = jqrb + gs + fp - 1
>> > sp.Offset(0, 2).Value = jqrb
>> > sp.Offset(0, 3).Value = gs
>> > sp.Offset(0, 4).Value = "*" & sp.Value & "+" & _
>> > sp.Offset(0, 1).Value & "+" & _
>> > sp.Offset(0, 3).Value & "+" & jn & "*"
>> >Do While jqm > 0
>> > Set sp = Cells(65536, 1).End(xlUp).Offset(1, 0)
>> > sp.Select
>> > sp.Value = "S000" & c
>> > c = c + 1
>> > fp = fp + gs
>> > sp.Offset(0, 1).Value = fp
>> > If jq - jqrb < gs Then
>> > gs = jq - jqrb
>> > jqrb = jqrb + gs
>> > jqm = jqm + gs
>> > Else
>> > jqrb = jqrb + gs
>> > jqm = jqm - gs
>> > End If
>> > sp.Offset(0, 2).Value = jqrb
>> > sp.Offset(0, 3).Value = gs
>> > sp.Offset(0, 4).Value = "*" & sp.Value & "+" & _
>> > sp.Offset(0, 1).Value & "+" & _
>> > sp.Offset(0, 3).Value & "+" & jn & "*"
>> >Loop
>> >
>> >End Sub
>> >
>> >regards
>> >FSt1
>> >
>> >"Little Penny" wrote:
>> >
>> >> I'm trying to create a code that will produce the following results.
>> >>
>> >> First the user will need to provide basic information.
>> >> Job quantity
>> >> First Piece
>> >> Group size
>> >> Job Number
>> >>
>> >>
>> >> The "Group Size" breaks the "Job Quantity" up into group size chucks.
>> >> For example if the "Job Quantity" is 14524 and the "Group Size" is
>> >> 3000 we would get four groups of 3000 and one group of 2524
>> >>
>> >>
>> >> Example 1
>> >>
>> >>
>> >>
>> >> Job Quantity = 14524
>> >> First Piece = 1
>> >> Group Size = 3000
>> >> Job Number = A12345
>> >>
>> >>
>> >> Code will produce:
>> >>
>> >> A B C D E
>> >> GroupID START END QTY Group BAR CODE
>> >> S0001 1 3000 3000 *S1001+1+3000+A12345*
>> >> S0002 3001 6000 3000 *S1002+3001+3000+A12345*
>> >> S0003 6001 9000 3000 *S1003+6001+3000+A12345*
>> >> S0004 9001 12000 3000 *S1004+9001+3000+A12345*
>> >> S0005 12001 14524 2524 *S1005+12001+2524+A12345*
>> >>
>> >>
>> >> As you can see a "*" is added at the beginning and end in column E.
>> >> Also everything is separated by a "+" sign. This format is import
>> >> because it will be read by a scanner.
>> >>
>> >>
>> >>
>> >> Example 2
>> >>
>> >> In this example the first piece 2541
>> >>
>> >>
>> >>
>> >> Job Quantity = 18233
>> >> First Piece = 2541
>> >> Group Size = 2500
>> >> Job Number = A12345
>> >>
>> >>
>> >> Code will produce:
>> >>
>> >> A B C D E
>> >> GroupID START END QTY Group BAR CODE
>> >> S0001 2541 5040 2500 *S1001+2541+2500+B12345*
>> >> S0002 5041 7540 2500 *S1002+5041+2500+B12345*
>> >> S0003 7541 10040 2500 *S1003+7541+2500+B12345*
>> >> S0004 10041 12540 2500 *S1004+10041+2500+B12345*
>> >> S0005 12541 15040 2500 *S1005+12541+2500+B12345*
>> >> S0006 15041 17540 2500 *S1006+15041+2500+B12345*
>> >> S0007 17541 20040 2500 *S1007+17541+2500+B12345*
>> >> S0008 20041 20773 733 *S1008+20041+733+B12345*
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> Column E which is the Group Bar code should use the bar code font
>> >> "CarolinaBar-B39-2.5-22x158x720"
>> >>
>> >> I hope I explained the right.
>> >>
>> >>
>> >> Where do I start?
>> >>

>>

 
Reply With Quote
 
Little Penny
Guest
Posts: n/a
 
      30th Sep 2007
If my jq (job qty) is less or equal to gs (group size). Or if my gs
(group size) divides evenly into my jq (job qty) my last line looks
like this. How do I prevent that?


S0011 30001 30000 0 *S0011+30001+0+D12345*







On Sun, 30 Sep 2007 09:35:15 +0800, "PY & Associates"
<(E-Mail Removed)> wrote:

>What happens when job qty is less than group size please? Just in case!
>
>"Little Penny" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed)...
>> All I can say is WOWWWWWWWWWWWWWWWWWWWWWWW
>>
>> N F-ing Credible
>>
>> Thanks
>>
>> I have just one request the Group ID increase as such...
>>
>>
>> OLD New
>> S0001 S0001
>> S0002 S0002
>> S0003 S0003
>> S0004 S0004
>> S0005 S0005
>> S0006 S0006
>> S0007 S0007
>> S0008 S0008
>> S0009 S0009
>> S00010 S0010
>> S00011 S0011
>> S00012 S0012
>> S00013 S0013
>> S00014 S0014
>> S00015 S0015
>>
>> Instead of adding a character it moves to the left.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Sat, 29 Sep 2007 13:39:02 -0700, FSt1
>> <(E-Mail Removed)> wrote:
>>
>> >hi
>> >this work on both of your examples
>> >I assumed that all your job would be in the same columns and that you

>would
>> >be just adding to them.
>> >
>> >Sub Macro1()
>> >Dim jq As Long 'job qty
>> >Dim jqm As Long 'job qty minus
>> >Dim jqbr As Long 'job qty run balance
>> >Dim fp As Long 'first piece
>> >Dim gs As Long 'group size
>> >Dim jn As String 'job number
>> >Dim c As Long 'counter
>> >Dim sp As Range 'sheet placement
>> >c = 1
>> >
>> >jq = InputBox("Enter the Job quanty.")
>> >fp = InputBox("Enter the first piece quanty.")
>> >gs = InputBox("Enter the qroup size.")
>> >jn = InputBox("Enter the Job Number.")
>> >jq = jq + fp - 1
>> >jqm = jq
>> >
>> >Set sp = Cells(65536, 1).End(xlUp).Offset(1, 0)
>> > sp.Select
>> > sp.Value = "S000" & c
>> > c = c + 1
>> > sp.Offset(0, 1).Value = fp
>> > jqrb = jqrb + gs + fp - 1
>> > sp.Offset(0, 2).Value = jqrb
>> > sp.Offset(0, 3).Value = gs
>> > sp.Offset(0, 4).Value = "*" & sp.Value & "+" & _
>> > sp.Offset(0, 1).Value & "+" & _
>> > sp.Offset(0, 3).Value & "+" & jn & "*"
>> >Do While jqm > 0
>> > Set sp = Cells(65536, 1).End(xlUp).Offset(1, 0)
>> > sp.Select
>> > sp.Value = "S000" & c
>> > c = c + 1
>> > fp = fp + gs
>> > sp.Offset(0, 1).Value = fp
>> > If jq - jqrb < gs Then
>> > gs = jq - jqrb
>> > jqrb = jqrb + gs
>> > jqm = jqm = gs
>> > Else
>> > jqrb = jqrb + gs
>> > jqm = jqm - gs
>> > End If
>> > sp.Offset(0, 2).Value = jqrb
>> > sp.Offset(0, 3).Value = gs
>> > sp.Offset(0, 4).Value = "*" & sp.Value & "+" & _
>> > sp.Offset(0, 1).Value & "+" & _
>> > sp.Offset(0, 3).Value & "+" & jn & "*"
>> >Loop
>> >
>> >End Sub
>> >
>> >regards
>> >FSt1
>> >
>> >"Little Penny" wrote:
>> >
>> >> I'm trying to create a code that will produce the following results.
>> >>
>> >> First the user will need to provide basic information.
>> >> Job quantity
>> >> First Piece
>> >> Group size
>> >> Job Number
>> >>
>> >>
>> >> The "Group Size" breaks the "Job Quantity" up into group size chucks.
>> >> For example if the "Job Quantity" is 14524 and the "Group Size" is
>> >> 3000 we would get four groups of 3000 and one group of 2524
>> >>
>> >>
>> >> Example 1
>> >>
>> >>
>> >>
>> >> Job Quantity = 14524
>> >> First Piece = 1
>> >> Group Size = 3000
>> >> Job Number = A12345
>> >>
>> >>
>> >> Code will produce:
>> >>
>> >> A B C D E
>> >> GroupID START END QTY Group BAR CODE
>> >> S0001 1 3000 3000 *S1001+1+3000+A12345*
>> >> S0002 3001 6000 3000 *S1002+3001+3000+A12345*
>> >> S0003 6001 9000 3000 *S1003+6001+3000+A12345*
>> >> S0004 9001 12000 3000 *S1004+9001+3000+A12345*
>> >> S0005 12001 14524 2524 *S1005+12001+2524+A12345*
>> >>
>> >>
>> >> As you can see a "*" is added at the beginning and end in column E.
>> >> Also everything is separated by a "+" sign. This format is import
>> >> because it will be read by a scanner.
>> >>
>> >>
>> >>
>> >> Example 2
>> >>
>> >> In this example the first piece 2541
>> >>
>> >>
>> >>
>> >> Job Quantity = 18233
>> >> First Piece = 2541
>> >> Group Size = 2500
>> >> Job Number = A12345
>> >>
>> >>
>> >> Code will produce:
>> >>
>> >> A B C D E
>> >> GroupID START END QTY Group BAR CODE
>> >> S0001 2541 5040 2500 *S1001+2541+2500+B12345*
>> >> S0002 5041 7540 2500 *S1002+5041+2500+B12345*
>> >> S0003 7541 10040 2500 *S1003+7541+2500+B12345*
>> >> S0004 10041 12540 2500 *S1004+10041+2500+B12345*
>> >> S0005 12541 15040 2500 *S1005+12541+2500+B12345*
>> >> S0006 15041 17540 2500 *S1006+15041+2500+B12345*
>> >> S0007 17541 20040 2500 *S1007+17541+2500+B12345*
>> >> S0008 20041 20773 733 *S1008+20041+733+B12345*
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> Column E which is the Group Bar code should use the bar code font
>> >> "CarolinaBar-B39-2.5-22x158x720"
>> >>
>> >> I hope I explained the right.
>> >>
>> >>
>> >> Where do I start?
>> >>

>

 
Reply With Quote
 
=?Utf-8?B?RlN0MQ==?=
Guest
Posts: n/a
 
      30th Sep 2007
hi again,
sorry i'm late.
just after this line
Do While jqm > 0
add this......
If jqrb = jq Then
Exit Do
End If
this will solve the job qty being less than or equal to group size. we call
the group size the lot size here.
as to the other problem....(you have a lot of lots).....in two places in the
code, replace....
If Len("S000" & c) > 5 Then
sp.Value = "S00" & c
Else
sp.Value = "S000" & c
End If
with....
If Len("S00" & c) > 5 Then
sp.Value = "S0" & c
Else
If Len("S000" & c) > 5 Then
sp.Value = "S00" & c
Else
sp.Value = "S000" & c
End If
End If
this should take your groups to 9999. if you have more lots that that, you
need to revamp your system.

regards
FSt1
"Little Penny" wrote:

> If my jq (job qty) is less or equal to gs (group size). Or if my gs
> (group size) divides evenly into my jq (job qty) my last line looks
> like this. How do I prevent that?
>
>
> S0011 30001 30000 0 *S0011+30001+0+D12345*
>
>
>
>
>
>
>
> On Sun, 30 Sep 2007 09:35:15 +0800, "PY & Associates"
> <(E-Mail Removed)> wrote:
>
> >What happens when job qty is less than group size please? Just in case!
> >
> >"Little Penny" <(E-Mail Removed)> wrote in message
> >news:(E-Mail Removed)...
> >> All I can say is WOWWWWWWWWWWWWWWWWWWWWWWW
> >>
> >> N F-ing Credible
> >>
> >> Thanks
> >>
> >> I have just one request the Group ID increase as such...
> >>
> >>
> >> OLD New
> >> S0001 S0001
> >> S0002 S0002
> >> S0003 S0003
> >> S0004 S0004
> >> S0005 S0005
> >> S0006 S0006
> >> S0007 S0007
> >> S0008 S0008
> >> S0009 S0009
> >> S00010 S0010
> >> S00011 S0011
> >> S00012 S0012
> >> S00013 S0013
> >> S00014 S0014
> >> S00015 S0015
> >>
> >> Instead of adding a character it moves to the left.
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> On Sat, 29 Sep 2007 13:39:02 -0700, FSt1
> >> <(E-Mail Removed)> wrote:
> >>
> >> >hi
> >> >this work on both of your examples
> >> >I assumed that all your job would be in the same columns and that you

> >would
> >> >be just adding to them.
> >> >
> >> >Sub Macro1()
> >> >Dim jq As Long 'job qty
> >> >Dim jqm As Long 'job qty minus
> >> >Dim jqbr As Long 'job qty run balance
> >> >Dim fp As Long 'first piece
> >> >Dim gs As Long 'group size
> >> >Dim jn As String 'job number
> >> >Dim c As Long 'counter
> >> >Dim sp As Range 'sheet placement
> >> >c = 1
> >> >
> >> >jq = InputBox("Enter the Job quanty.")
> >> >fp = InputBox("Enter the first piece quanty.")
> >> >gs = InputBox("Enter the qroup size.")
> >> >jn = InputBox("Enter the Job Number.")
> >> >jq = jq + fp - 1
> >> >jqm = jq
> >> >
> >> >Set sp = Cells(65536, 1).End(xlUp).Offset(1, 0)
> >> > sp.Select
> >> > sp.Value = "S000" & c
> >> > c = c + 1
> >> > sp.Offset(0, 1).Value = fp
> >> > jqrb = jqrb + gs + fp - 1
> >> > sp.Offset(0, 2).Value = jqrb
> >> > sp.Offset(0, 3).Value = gs
> >> > sp.Offset(0, 4).Value = "*" & sp.Value & "+" & _
> >> > sp.Offset(0, 1).Value & "+" & _
> >> > sp.Offset(0, 3).Value & "+" & jn & "*"
> >> >Do While jqm > 0
> >> > Set sp = Cells(65536, 1).End(xlUp).Offset(1, 0)
> >> > sp.Select
> >> > sp.Value = "S000" & c
> >> > c = c + 1
> >> > fp = fp + gs
> >> > sp.Offset(0, 1).Value = fp
> >> > If jq - jqrb < gs Then
> >> > gs = jq - jqrb
> >> > jqrb = jqrb + gs
> >> > jqm = jqm = gs
> >> > Else
> >> > jqrb = jqrb + gs
> >> > jqm = jqm - gs
> >> > End If
> >> > sp.Offset(0, 2).Value = jqrb
> >> > sp.Offset(0, 3).Value = gs
> >> > sp.Offset(0, 4).Value = "*" & sp.Value & "+" & _
> >> > sp.Offset(0, 1).Value & "+" & _
> >> > sp.Offset(0, 3).Value & "+" & jn & "*"
> >> >Loop
> >> >
> >> >End Sub
> >> >
> >> >regards
> >> >FSt1
> >> >
> >> >"Little Penny" wrote:
> >> >
> >> >> I'm trying to create a code that will produce the following results.
> >> >>
> >> >> First the user will need to provide basic information.
> >> >> Job quantity
> >> >> First Piece
> >> >> Group size
> >> >> Job Number
> >> >>
> >> >>
> >> >> The "Group Size" breaks the "Job Quantity" up into group size chucks.
> >> >> For example if the "Job Quantity" is 14524 and the "Group Size" is
> >> >> 3000 we would get four groups of 3000 and one group of 2524
> >> >>
> >> >>
> >> >> Example 1
> >> >>
> >> >>
> >> >>
> >> >> Job Quantity = 14524
> >> >> First Piece = 1
> >> >> Group Size = 3000
> >> >> Job Number = A12345
> >> >>
> >> >>
> >> >> Code will produce:
> >> >>
> >> >> A B C D E
> >> >> GroupID START END QTY Group BAR CODE
> >> >> S0001 1 3000 3000 *S1001+1+3000+A12345*
> >> >> S0002 3001 6000 3000 *S1002+3001+3000+A12345*
> >> >> S0003 6001 9000 3000 *S1003+6001+3000+A12345*
> >> >> S0004 9001 12000 3000 *S1004+9001+3000+A12345*
> >> >> S0005 12001 14524 2524 *S1005+12001+2524+A12345*
> >> >>
> >> >>
> >> >> As you can see a "*" is added at the beginning and end in column E.
> >> >> Also everything is separated by a "+" sign. This format is import
> >> >> because it will be read by a scanner.
> >> >>
> >> >>
> >> >>
> >> >> Example 2
> >> >>
> >> >> In this example the first piece 2541
> >> >>
> >> >>
> >> >>
> >> >> Job Quantity = 18233
> >> >> First Piece = 2541
> >> >> Group Size = 2500
> >> >> Job Number = A12345
> >> >>
> >> >>
> >> >> Code will produce:
> >> >>
> >> >> A B C D E
> >> >> GroupID START END QTY Group BAR CODE
> >> >> S0001 2541 5040 2500 *S1001+2541+2500+B12345*
> >> >> S0002 5041 7540 2500 *S1002+5041+2500+B12345*
> >> >> S0003 7541 10040 2500 *S1003+7541+2500+B12345*
> >> >> S0004 10041 12540 2500 *S1004+10041+2500+B12345*
> >> >> S0005 12541 15040 2500 *S1005+12541+2500+B12345*
> >> >> S0006 15041 17540 2500 *S1006+15041+2500+B12345*
> >> >> S0007 17541 20040 2500 *S1007+17541+2500+B12345*
> >> >> S0008 20041 20773 733 *S1008+20041+733+B12345*
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> Column E which is the Group Bar code should use the bar code font
> >> >> "CarolinaBar-B39-2.5-22x158x720"
> >> >>
> >> >> I hope I explained the right.
> >> >>
> >> >>
> >> >> Where do I start?
> >> >>

> >

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Archive code -- modify my code! Ray Microsoft Outlook VBA Programming 3 17th Nov 2009 09:16 PM
Reference.map(1): Custom tool warning: DiscoCodeGenerator unable to initialize code generator. No code generated. genc ymeri Microsoft ASP .NET 0 27th Apr 2006 04:28 PM
Reference.map(1): Custom tool warning: DiscoCodeGenerator unable to initialize code generator. No code generated. genc ymeri Microsoft C# .NET 0 27th Apr 2006 04:28 PM
Re: Code for setting Forms to open with custom tool bar, menubar and control custom short Rick Brandt Microsoft Access 0 5th Feb 2006 01:06 PM
VB6 - Access ADP Database Custom Property / Or Read Line of Code In ADP Code Module WhatTha Microsoft Access VBA Modules 0 24th Jan 2006 03:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:04 AM.