Information générale
Catégorie:
Codage, syntaxe et commandes
The following code is lengthy but it is this way to epxlicity show you all that is being done. It takes numeric and date data types and right alligns them into one string. Check your immediate window (put a breakpoint on the End Sub line) for the output. Cheers.
Private Sub Command1_Click()
Dim x As String * 10
Dim y As String * 16
Dim z As String * 26
Dim num1 As Long
Dim num2 As Long
Dim date1 As Date
Dim date2 As Date
num1 = 123456
num2 = 123
date1 = Date
date2 = Date
RSet x = Str(num1)
RSet y = Format(date1, "mm-ddd-yyyy")
z = x & y
Debug.Print z
RSet x = Str(num2)
RSet y = Format(date2, "mm-ddd-yyyy")
z = x & y
Debug.Print z
End Sub
Précédent
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