Can I create a full VBA programme with no entry onto a spreadsheet?

Little_Clubber

New Member
Joined
Nov 10, 2017
Messages
32
Hi Everyone,
Let's open with "I Love Excel!" It's great and so powerful as long as you tell it correctly what you want it to do. And that's where I need your help...

On a production line, we produce LH and RH parts, and apply a barcode label to each.
Barcode labelling of the parts is not the issue and this is always correct.

In months gone by however, we then put the LH part into the RH box (and vice versa), and sealed the box with parts missing (Quantity should be 72 but we have sent with 71 or less). Finally, if we get the correct quantity of the correct hand in the sealed box, we have then put the wrong label on the outside of that box.

I began writing a validation programme in VBA where the user scans the QR barcode into a userform.
The QR barcode contains 4 lines of text; this is split into 4 columns in the spreadsheet and the data checked (Correct hand) and quantity counted but if an incorrect part is scanned, I can get it to display an error but not carry on etc.

Is it possible to write the full programme in VB without the need for the spreadsheet as if there's any other user input required, it WILL go wrong. Specifically, I am looking to do this:

I'll have 2 tablets (1 on LH of workstation;1 on RH of workstation)<o:p></o:p>
Part presented to tablet - with QR barcode<o:p></o:p>
1st scan will programme the tablet - From now on we're checking for this part<o:p></o:p>
Barcode contains 4 lines of text<o:p></o:p>
Part No<o:p></o:p>
Description <o:p></o:p>
Colour<o:p></o:p>
Unique Identifier
<o:p></o:p>
Then each following scan:
From part number - determine if partpresented to correct tablet (ie LH to LH)<o:p></o:p>
If not OK - error message (Actual Message TBD)<o:p></o:p>
If OK - confirm not previouslyscanned part (from unique identifier)<o:p></o:p>
If OK add 1 to the count<o:p></o:p>
At count of 24 display message"1st layer full"<o:p></o:p>
At count of 48 display message"2nd layer full"<o:p></o:p>
At count of 72 display "palletfull, present box label"<o:p></o:p>
Scan requested box label (this is a Code 39 barcode of the part number - so compare part numbers knowing that this is a pallet label because the entry was only a single line entry not a 4 line entry as per the barcode on each part)
<o:p></o:p>
If not OK - error message<o:p></o:p>
If OK - Green Tick and reset count to 0<o:p></o:p>
Any attempt to scan pallet labelbefore count of 72 - display error message


Thanks a million for any and all help.<o:p></o:p>
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Yes, there is no mandate that data be on a worksheet for a program to work, so long as the code is written to respond to the scanned input rather than data on a worksheet.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top