(16/02/2020, 16:01)feraz yazdı: Örneği inceleyiniz.Önceki kodda left,riggt,ve mid kodlarındaki yerler ters yazılmış.Forum sitesinde sorun var sanırım, dosya yükleyemiyorum.
Textboxa veri girip butona tıklayınız.
Textbox boşssa felan şart koydum gerek olmayabilir hata vermemesi içindi.
Forma yükleyemedim dosyayı.
https://www.dosyaupload.com/74g3
Kod:Option Compare Database
Private Sub Befehl0_Click()
Dim x As Byte, y As Byte
If Not IsNull(txt1.Value) Or txt1.Value <> "" Then
If Left(txt1.Value, 1) = "(" Then
x = 2
Else
x = 1
End If
If Right(txt1.Value, 1) = ")" Then
y = Len(txt1.Value) - 1
Else
y = Len(txt1.Value)
End If
If x > 1 Then y = y - 1
txt1.Value = Mid(txt1.Value, x, y)
End If
End Sub
Elinize sağlık doğru şekilde çalışıyor ve hata vermedi. Farklı örnekler üzerinden denedim çalışıyor. sağ olun, teşekkür ederim.