?
Solved

Bartender Software +Visual Basic

Posted on 2011-03-08
1
Medium Priority
?
1,744 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 65

Accepted Solution

by:
RobSampson earned 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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…
Invest in your employees with these five simple steps to improve employee engagement and retention.
This video will demonstrate how to find the puppet warp tool from the edit menu and where to put the points to edit.
Video by: Tony
This video teaches viewers how to export a project from Adobe Premiere Pro and the various file types involved.

777 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