D'apres ce que je comprends, je dirais de faire ainsi:
Dim StringA As String = TextBox1.Text Dim StringB As String Dim SResult As String Dim pos As Integer = InStr(StringA, "t") If pos > 0 Then StringB = Microsoft.VisualBasic.Right(StringA, StringA.Length - pos) pos = InStr(StringB, "d") If pos > 0 Then SResult = Microsoft.VisualBasic.Left(StringB, pos - 1) End If End If If Not SResult Is Nothing Then MsgBox(SResult)
++
"DEDE" a écrit :
Salut à tous,
Je souhaiterai recuperé ds info ds une chaine de caractere
ex : "azertyuiopqsdfghjklm" je ve recuperé de la lettre "t" à "d" je pensé faire ac la position ici 4éme caractere o 13!
Quel comande j doi utilisé ?
Merci
Salut,
Eh peux tu etre un peu plus clair ?
Que dois tu faire exactement ?
D'apres ce que je comprends, je dirais de faire ainsi:
Dim StringA As String = TextBox1.Text
Dim StringB As String
Dim SResult As String
Dim pos As Integer = InStr(StringA, "t")
If pos > 0 Then
StringB = Microsoft.VisualBasic.Right(StringA, StringA.Length -
pos)
pos = InStr(StringB, "d")
If pos > 0 Then
SResult = Microsoft.VisualBasic.Left(StringB, pos - 1)
End If
End If
If Not SResult Is Nothing Then MsgBox(SResult)
++
"DEDE" a écrit :
Salut à tous,
Je souhaiterai recuperé ds info ds une chaine de caractere
ex : "azertyuiopqsdfghjklm" je ve recuperé de la lettre "t" à "d" je pensé
faire ac la position ici 4éme caractere o 13!
D'apres ce que je comprends, je dirais de faire ainsi:
Dim StringA As String = TextBox1.Text Dim StringB As String Dim SResult As String Dim pos As Integer = InStr(StringA, "t") If pos > 0 Then StringB = Microsoft.VisualBasic.Right(StringA, StringA.Length - pos) pos = InStr(StringB, "d") If pos > 0 Then SResult = Microsoft.VisualBasic.Left(StringB, pos - 1) End If End If If Not SResult Is Nothing Then MsgBox(SResult)
++
"DEDE" a écrit :
Salut à tous,
Je souhaiterai recuperé ds info ds une chaine de caractere
ex : "azertyuiopqsdfghjklm" je ve recuperé de la lettre "t" à "d" je pensé faire ac la position ici 4éme caractere o 13!
circuit = (Mid(TextLine, 20, 8)) numero = (Mid(TextLine, 31, 15)) plan = Trim(circuit) & Trim(numero)
a+
"Sebdraluorg" a écrit dans le message de news:
Salut,
Eh peux tu etre un peu plus clair ?
Que dois tu faire exactement ?
D'apres ce que je comprends, je dirais de faire ainsi:
Dim StringA As String = TextBox1.Text Dim StringB As String Dim SResult As String Dim pos As Integer = InStr(StringA, "t") If pos > 0 Then StringB = Microsoft.VisualBasic.Right(StringA,
StringA.Length -
pos) pos = InStr(StringB, "d") If pos > 0 Then SResult = Microsoft.VisualBasic.Left(StringB, pos - 1) End If End If If Not SResult Is Nothing Then MsgBox(SResult)
++
"DEDE" a écrit :
> Salut à tous, > > Je souhaiterai recuperé ds info ds une chaine de caractere > > ex : "azertyuiopqsdfghjklm" je ve recuperé de la lettre "t" à "d" je
pensé
> faire ac la position ici 4éme caractere o 13! > > Quel comande j doi utilisé ? > > Merci > > >
re
j reussi ac aide:
circuit = (Mid(TextLine, 20, 8))
numero = (Mid(TextLine, 31, 15))
plan = Trim(circuit) & Trim(numero)
a+
"Sebdraluorg" <Sebdraluorg@discussions.microsoft.com> a écrit dans le
message de news: 3BC88582-481B-4E23-89D2-A5DEA4E38ED1@microsoft.com...
Salut,
Eh peux tu etre un peu plus clair ?
Que dois tu faire exactement ?
D'apres ce que je comprends, je dirais de faire ainsi:
Dim StringA As String = TextBox1.Text
Dim StringB As String
Dim SResult As String
Dim pos As Integer = InStr(StringA, "t")
If pos > 0 Then
StringB = Microsoft.VisualBasic.Right(StringA,
StringA.Length -
pos)
pos = InStr(StringB, "d")
If pos > 0 Then
SResult = Microsoft.VisualBasic.Left(StringB, pos - 1)
End If
End If
If Not SResult Is Nothing Then MsgBox(SResult)
++
"DEDE" a écrit :
> Salut à tous,
>
> Je souhaiterai recuperé ds info ds une chaine de caractere
>
> ex : "azertyuiopqsdfghjklm" je ve recuperé de la lettre "t" à "d" je
pensé
> faire ac la position ici 4éme caractere o 13!
>
> Quel comande j doi utilisé ?
>
> Merci
>
>
>
circuit = (Mid(TextLine, 20, 8)) numero = (Mid(TextLine, 31, 15)) plan = Trim(circuit) & Trim(numero)
a+
"Sebdraluorg" a écrit dans le message de news:
Salut,
Eh peux tu etre un peu plus clair ?
Que dois tu faire exactement ?
D'apres ce que je comprends, je dirais de faire ainsi:
Dim StringA As String = TextBox1.Text Dim StringB As String Dim SResult As String Dim pos As Integer = InStr(StringA, "t") If pos > 0 Then StringB = Microsoft.VisualBasic.Right(StringA,
StringA.Length -
pos) pos = InStr(StringB, "d") If pos > 0 Then SResult = Microsoft.VisualBasic.Left(StringB, pos - 1) End If End If If Not SResult Is Nothing Then MsgBox(SResult)
++
"DEDE" a écrit :
> Salut à tous, > > Je souhaiterai recuperé ds info ds une chaine de caractere > > ex : "azertyuiopqsdfghjklm" je ve recuperé de la lettre "t" à "d" je
pensé
> faire ac la position ici 4éme caractere o 13! > > Quel comande j doi utilisé ? > > Merci > > >