Solved

Bartender Software +Visual Basic

Posted on 2011-03-08
1
1,629 Views
Last Modified: 2012-05-11
We are using Bartender 9.4.  I'd like some help with the Visual Basic addin.  Basically, we have a lot number (for example, 11030801).  11-year; 03-month; 08-day; 01-constant lot number.  I'd like to have a label where the a "best by" text field is suffixed by a date 3 months extended from the month in the lot number.  In this case, "best by" '06/08/11'.  If this could be done via a prompt for the lot number, or with the lot number as a constant field on the label, itself, that would be most helpful.   Any ideas?
0
Comment
Question by:mrherndon
1 Comment
 
LVL 65

Accepted Solution

by:
RobSampson earned 500 total points
ID: 35079508
Hi, I have no idea how to add the field or label because I don't know what the interface is, nor do I know how to get the lot number.  But, if I assume that you can get the lot number into a variable called strLotNumber, this VB code will add three months to that.

Regards,

Rob.
strLotNumber = "11030801"
dteDate = CDate(Mid(strLotNumber, 5, 2) & "-" & MonthName(Mid(strLotNumber, 3, 2), True) & "-" & Left(strLotNumber, 2))
dteBestBy = DateAdd("m", 3, dteDate)
strBestBy = Right("0" & Month(dteBestBy), 2) & "/" & Right("0" & Day(dteBestBy), 2) & "/" & Right(Year(dteBestBy), 2)
MsgBox strBestBy

Open in new window

0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This video demonstrates basic masking and how to edit the mask to reveal the desired image.
The viewer will learn how to set up a document for the web and print and the recommended PPI for printing.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now