DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Textboxu seçince rengin değişmesi için aşağıdaki kodu kullanın.
Private Sub TextBox1_Enter()
TextBox1.BackColor = vbYellow
End Sub
Textboxtan çıkınca rengin eski haline gelmesi içinde aşağıdaki kodu kullanın.
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox1.BackColor = vbWhite
End Sub
istediğim userformda 30 adet textbox var girişleri yapıp command buton a bastığımda en son hangi textbox ta olduğumu anlamak istiyorum txtbox exit olayında bir hesaplama yaptırıyorum textbox tan çıkmadan butona basıldığı zaman hesaplama yapmıyor bunun içinİşinize yarar diye düşünüyorum.
Kod:Textboxu seçince rengin değişmesi için aşağıdaki kodu kullanın. Private Sub TextBox1_Enter() TextBox1.BackColor = vbYellow End Sub Textboxtan çıkınca rengin eski haline gelmesi içinde aşağıdaki kodu kullanın. Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) TextBox1.BackColor = vbWhite End Sub
Textbox zemin rengi | Excel WEB TR Forum - Excel, Excel Makro, Excel Fonksiyon, Excel Formül, Excel soru ve çözümleri
Dim Genel As Integer
Private Sub TextBox1_Enter()
Genel=1
End Sub
Private Sub TextBox2_Enter()
Genel=2
End Sub
Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
' Create custom variable that holds two integers
Type POINTAPI
Xcoord As Long
Ycoord As Long
End Type
Sub GetCursorPosDemo()
Dim llCoord As POINTAPI
Dim rng As Range
' Get the cursor positions
GetCursorPos llCoord
' Display the cursor position coordinates
'MsgBox "X Position: " & llCoord.Xcoord & vbNewLine & "Y Position: " & llCoord.Ycoord
Set rng = GetRange(llCoord.Xcoord, llCoord.Ycoord)
If Not rng Is Nothing Then
MsgBox "Cell under mouse is :" & rng.Address
Else
MsgBox "Not a valid location."
End If
End Sub
Function GetRange(x As Long, y As Long) As Range
Set GetRange = ActiveWindow.RangeFromPoint(x, y)
End Function
#if Win64 then
Declare PtrSafe Function MyMathFunc Lib "User32" (ByVal N As LongLong) As LongLong
#else
Declare Function MyMathFunc Lib "User32" (ByVal N As Long) As Long
#end if