Forum

Notifications
Clear all

Barcode Help

11 Posts
2 Users
0 Reactions
98 Views
(@and180y)
Posts: 8
Active Member
Topic starter
 

Hi Guys,

           I have been struggling to get data to render as a barcode so that the barcode changes every time the data changes or with an update button (least preferred option) 

Cell A18 in the label is populated with data from the data sheet.
Thus =DATA!A2 which gives me 205-8572073-5532359. I have tried different macros to get a barcode but can't get them to work.

I tried a workaround with a font which did actually work but relies on the text to look like this *205-8572073-5532359* so as to produce the barcode, I couldn't automate the asterisks appearing.

I'd be forever grateful if someone could help or point me in the right direction.  Thanks in advance.

 
Posted : 27/03/2020 2:05 pm
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Andy,

This is not code I wrote so I do not know how it works.  With regards to it changing as the data changes, it is doing this for me so not sure why it isn't doing it for you?  The function output goes into cell G12 but there's an image sitting over that.  Maybe the code is changing but you aren't noticing it because f the image over the cell?

Have you tried my barcode code ?

Regards

Phil

 
Posted : 27/03/2020 8:22 pm
(@and180y)
Posts: 8
Active Member
Topic starter
 

Hi Phillip,

             I think I have added your code in correctly but I still cant get the barcode to scan once printed. Any ideas what I have done wrong? Thanks in advance. 🙂 

 
Posted : 27/03/2020 9:45 pm
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Andy,

The cell with the Barcode function was set to Text format and the font was Bold.  Having it Bold mean the bars weren't being read properly.  

The attached file works for me to generate Code128 barcodes.

The DataMatrix function is also generating matrices but I don't have a reader to check that they are correct.

Regards

Phil

 
Posted : 27/03/2020 10:44 pm
(@and180y)
Posts: 8
Active Member
Topic starter
 

Hi Philip, apologies for my ignorance in not replying to thank you for your help, I had some unplanned time away from my computer and forgot to return to the thread. Thanks, it worked perfectly.

 

I have run into another issue though and wondered if you could point me in the right direction? 

In my data sheet which generates the label on the label sheet I have this macro 

Option Explicit

Sub Next_Label()
With Rows(9): .Copy [A2]: .Delete: End With
End Sub

Which copies the data in row 9 to row two and moves the data up one row so that row 9 is re-populated ready for me to click a "Next Label" button on the label sheet. However when I run the macro instead of the data matrix I get an error "Unable to get the Width property" but if I go to the data sheet and manually copy and paste the matrix is fine. Any idea what would cause that? 

 
Posted : 22/04/2020 6:45 pm
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

No worries Andy.

That code works fine for me but I'm running it out of the context of your environment.  So I'll need your workbook to test it properly.

Regards

Phil

 
Posted : 22/04/2020 11:46 pm
(@and180y)
Posts: 8
Active Member
Topic starter
 

Hi Phil,

          Have attached the sheet, I have changed the macro a bit but still no joy. I'm not sure why there is a small matrix in K4. I'm starting to wonder if the matrix is working via that. If you copy and paste row 9 the label is fine but clicking the button throws the error I mentioned.

 

Thanks

Andy 

 
Posted : 23/04/2020 7:45 pm
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Andy,

no workbook attached.

Regards

Phil

 
Posted : 23/04/2020 8:00 pm
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Andy,

I've run that code loads of times without error.

Have you tried stepping through the code to see where it is generating the error?

The only place where Width is mentioned in the code is in the DataMatrix function so the error must be generated in there.

Phil

 
Posted : 24/04/2020 2:37 am
(@and180y)
Posts: 8
Active Member
Topic starter
 

Is there a way to private message you on here Phil? 

 
Posted : 24/04/2020 6:43 pm
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Andy,

You can raise a ticket on the Helpdesk which will not be publicly seen.

Cheers

Phil

 
Posted : 24/04/2020 8:29 pm
Share: