• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Barcode Help|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / Barcode Help|VBA & Macros|Excel Forum|My Online Training Hub

vba course banner

Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumVBA & MacrosBarcode Help
sp_PrintTopic sp_TopicIcon
Barcode Help
Avatar
And180y
Member
Members
Level 0
Forum Posts: 10
Member Since:
March 27, 2020
sp_UserOfflineSmall Offline
1
March 27, 2020 - 4:05 am
sp_Permalink sp_Print

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.

sp_AnswersTopicSeeAnswer See Answer
Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1530
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
2
March 27, 2020 - 10:22 am
sp_Permalink sp_Print

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

Avatar
And180y
Member
Members
Level 0
Forum Posts: 10
Member Since:
March 27, 2020
sp_UserOfflineSmall Offline
3
March 27, 2020 - 11:45 am
sp_Permalink sp_Print

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. 🙂 

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1530
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
4
March 27, 2020 - 12:44 pm
sp_Permalink sp_Print

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

sp_AnswersTopicAnswer
Answers Post
Avatar
And180y
Member
Members
Level 0
Forum Posts: 10
Member Since:
March 27, 2020
sp_UserOfflineSmall Offline
5
April 22, 2020 - 8:45 am
sp_Permalink sp_Print

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? 

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1530
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
6
April 22, 2020 - 1:46 pm
sp_Permalink sp_Print

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

Avatar
And180y
Member
Members
Level 0
Forum Posts: 10
Member Since:
March 27, 2020
sp_UserOfflineSmall Offline
7
April 23, 2020 - 9:45 am
sp_Permalink sp_Print

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 

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1530
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
8
April 23, 2020 - 10:00 am
sp_Permalink sp_Print

Hi Andy,

no workbook attached.

Regards

Phil

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1530
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
9
April 23, 2020 - 4:37 pm
sp_Permalink sp_Print

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

Avatar
And180y
Member
Members
Level 0
Forum Posts: 10
Member Since:
March 27, 2020
sp_UserOfflineSmall Offline
10
April 24, 2020 - 8:43 am
sp_Permalink sp_Print

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

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1530
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
11
April 24, 2020 - 10:29 am
sp_Permalink sp_Print

Hi Andy,

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

Cheers

Phil

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Orlando Menes, Alicia Greynolds, Lee Mapes
Guest(s) 5
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 873
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 222
Jessica Stewart: 218
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Blair Gallagher
Brandi Taylor
Hafiz Ihsan Qadir
Gontran Bage
adolfo casanova
Annestine Johnpulle
Priscila Campbell
Jeff Mikles
Aaron Butler
Maurice Petterlin
Forum Stats:
Groups: 3
Forums: 24
Topics: 6369
Posts: 27852

 

Member Stats:
Guest Posters: 49
Members: 32359
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.