Versions des environnements
I need a help to convert the following vb code to vfp. the following code print bar code on excel form a 2 cell,
if any one can help me to convert the code:-
Sub jbm()
Dim CompanyName As String, sProductID As String, sProductName As String, sunitprice As Double, times As Double
Dim x As Integer
********** Can be take from query1
CompanyName = Cells(1, 1)
sProductID = Trim(Cells(1, 2))
sProductName = Cells(1, 3)
sunitprice = Cells(1, 4)
times = Cells(1, 5)
********************************************
Open "LPT1:" For Output As #1
Print #1, "US" + Chr(10) + Chr(13)
Print #1, "S4" + Chr(10) + Chr(13)
Print #1, "Q200,24" + Chr(10) + Chr(13)
Print #1, "N" + Chr(10) + Chr(13)
Print #1, "A290,10,0,4,1,1,N,""" + CompanyName + """" + Chr(10) + Chr(13)
x = 285 + (16 - Len(sProductID)) * 7
Print #1, "B" & x & ",40,0,1,2,3,70,B,""" & sProductID & """" + Chr(10) + Chr(13)
Print #1, "A290,140,0,2,1,1,N,""" + sProductName + """" + Chr(10) + Chr(13)
' Print #1, "A290,160,0,4,1,1,N,""Price : " + Format(Val(sunitprice), "0.000") + """" + Chr(10) + Chr(13)
Print #1, "P" + Format(Val(times)) + Chr(10) + Chr(13)
Close #1
End Sub
*******************************
thank you
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement