|
-
Apr 12th, 2013, 01:13 AM
#4
Re: Barcode Issue?
As DM says
Let's say that the value is 1234 or 001234
1.-
Store the value in a string variable, let's say MyStr
Convert to numeric
Dim X As Integer
X = CInt(MyStr)
Then convert to desired output using Format
MyStr = Format(X, "00000")
Or
2.-
Store the value in a string variable, let's say MyStr
Then if length equal to 4 then add one 0
If Len(MyStr) = 4 Then MyStr = "0" & MyStr
If the length is equal to 5 then cut first 0
If Len(MyStr) = 5 Then MyStr = Mid(MyStr,2)
JG
... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|