Sunday, August 10, 2008

Updated UPC Barcode Generator

Remember back when I told you about a $50 Project where I created a handy little UPC barcode generator in Excel? I noticed after that post I receive a meaningful amount of traffic from search engines based on phrases like "barcode generator" and the like. I kept wondering who those people were. Well, not that long ago I found out who at least one of them is: a guy named Ian.

Ian contacted me and wanted me to tweak the barcode generator I had built to suit his needs. Instead of generating one UPC barcode image at a time that he could copy-paste as he needs, he wanted to be able to generate long lists of UPC barcode images and save them as .JPEG files, so that he could later use a mail merge type function to pull them into documents as he needed. Sweet idea. Seemed pretty straightforward...

Turns out that getting those images I created using the little known camera feature in Excel exported to .JPEG files is not so simple. What I ended up doing is creating on the fly what is essentially a blank chart object and them filling it with the image, then exporting the chart as an image using the Chart.Export function in VBA. Whew. Here's a screen shot:

(Click the image to see a larger version.)

For a long list (hundreds or thousands of UPC codes) the process can take some time to complete, so I also threw in a little feature I've been doing when run times last more than a few seconds -- a little progress bar screen. It's essentially another normally hidden tab in the file that appears during run time to show the user how far along they are. Looks cool, too, I don't mind saying:

(Click the image to see a larger version.)

Ian, hope the file's everything you were hoping for.

Excel_Geek Insiders, your copy of the file's on it's way.



1 comment:

Anonymous said...

As for me, I am testing the related UPC barcode generator in Excel these days. Do you have any ideas about it? Or any good suggestion? I am totally a green hand on barcode generating field. Any suggestion will be appreciated. Thanks in advance.