×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

NiceLabel VBscript to make label print output

NiceLabel VBscript to make label print output

NiceLabel VBscript to make label print output

(OP)
Hello,

We use NiceLabel software for our production/shipping department. Our label fields are taken from SQL table or programmed with VBScript. I have some special assignment now.
I have one table TWeek (Week in a year of production) TYear(year of production). So like 15W-2020Y.

I would like to program formula to convert this table dataWeek and Year to date DD.MM.YYYY
I have found these 2 options in VBScript, but i can't run it. Object required: 'Wscript'

»
Dim year: year = 2016
Dim wn: wn = 45
Dim wd: wd = DateAdd("ww", wn, DateSerial(year,1,1))
WScript.Echo wd - WeekDay(wd, vbMonday) + 1
«

and other option:

»
Function DateYWkWd(year, wn, wd)
' returns date based von VbMondeay and vbFirstFourDays

Jan4 = Dateserial(year,1,4) ' garantied to be in first week
DateYWkWd = DateAdd("ww",wn-1, DateAdd("d",wd-Weekday(Jan4,2),Jan4))
end Function
«


Thank you for help,

Br,
Andrei


RE: NiceLabel VBscript to make label print output

Nicelabel hosts Vbscript (well, it's own version, which differs a bit from Microsoft's) itself, does not use wscript (or cscript), so just use echo rather than wscript.echo

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close