Solved

Bartender Software +Visual Basic

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

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…
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
The viewer will learn how to create multiple layers to apply various filters and how to delete areas from each layer’s filter.
This video will demonstrate how to find the puppet warp tool from the edit menu and where to put the points to edit.

696 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