Solved

Bartender Software +Visual Basic

Posted on 2011-03-08
1
1,642 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
Healthcare organizations in the United States must adhere to the guidance of both the HIPAA (Health Insurance Portability and Accountability Act) and HITECH (Health Information Technology for Economic and Clinical Health Act) for securing and protec…
The viewer will learn how to create multiple layers to apply various filters and how to delete areas from each layer’s filter.
Viewers will learn how to use the Hootsuite Dashboard.

914 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

23 Experts available now in Live!

Get 1:1 Help Now