Merhaba
Konu başlığındada belirttiğim gibi textbox1'un değer boşken textbox2 değeri silebilmem için makro kodu verebilirmisiniz?
Konu başlığındada belirttiğim gibi textbox1'un değer boşken textbox2 değeri silebilmem için makro kodu verebilirmisiniz?
Kod:
Public kontrol As Integer
Private Sub TextBox1_Change()
If Not IsNumeric(TextBox1) Then SendKeys "{BS}" 'sadece rakam ve nokta,virgül girilebilir
If (kontrol = 0) Then
btc = Val(TextBox1.Value)
eur = btc * Val(ActiveSheet.Range("W63").Value)
TextBox2.Text = eur
TextBox2 = Format(TextBox2, "#,##0.0000")
End If
TextBox1.Text = ""
End Sub
Private Sub TextBox1_GotFocus()
TextBox1.Text = "" 'textbox1 boşaltma
kontrol = 0 'kontrol btc de
End Sub
Private Sub TextBox2_Change()
If Not IsNumeric(TextBox2) Then SendKeys "{BS}" 'sadece rakam ve nokta,virgül girilebilir
If (kontrol = 1) Then
eur = Val(TextBox2.Value)
btc = eur / Val(ActiveSheet.Range("W63").Value)
TextBox1.Text = btc
TextBox1 = Format(TextBox1, "#,##0.0000")
End If
End Sub
Private Sub TextBox2_GotFocus()
TextBox2.Text = "" 'textbox2 boşaltma
kontrol = 1 'kontrol euro da
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
End Sub
Son düzenleme:
