karaelmas4467
Altın Üye
- Katılım
- 23 Aralık 2006
- Mesajlar
- 202
- Excel Vers. ve Dili
- 2003
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim İZİN_TÜRÜ As String
If Intersect(Target, [D4:D65536]) Is Nothing Then Exit Sub
On Error Resume Next
With Target
.Comment.Delete
.AddComment
.Comment.Visible = False
.Comment.Shape.TextFrame.AutoSize = True
If .Offset(0, 2) = "senelik" Then
İZİN_TÜRÜ = "senelik izin"
ElseIf .Offset(0, 2) = "mazeret" Then
İZİN_TÜRÜ = "mazeret izni"
ElseIf .Offset(0, 2) = "rapor" Then
İZİN_TÜRÜ = "rapor"
End If
.Comment.Text Text:="""" & .Offset(0, -2) & """ " & Target & " gün """ & " " & İZİN_TÜRÜ
End With
End Sub
Selamlar,
Aşağıdaki kodu sayfanızın kod bölümüne uygulayıp denermisiniz. D sütununda hücreyi tıkladığınızda otomatik olarak açıklama eklenir.
Kod:Option Explicit Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Intersect(Target, [D4:D65536]) Is Nothing Then Exit Sub On Error Resume Next With Target .Comment.Delete .AddComment .Comment.Visible = False .Comment.Text Text:="""" & .Offset(0, -2) & """ " & Target & " gün """ & " senelik izin" End With End Sub
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim İZİN_TÜRÜ As String
If Intersect(Target, [D4:D65536]) Is Nothing Then Exit Sub
On Error Resume Next
With Target
.Comment.Delete
.AddComment
.Comment.Visible = False
.Comment.Shape.TextFrame.AutoSize = True
If .Offset(0, 2) = "senelik" Then
İZİN_TÜRÜ = "senelik izin"
ElseIf .Offset(0, 2) = "mazeret" Then
İZİN_TÜRÜ = "mazeret izni"
ElseIf .Offset(0, 2) = "rapor" Then
İZİN_TÜRÜ = "rapor"
End If
.Comment.Text Text:="" & .Offset(0, -2) & " " & .Offset(0, -1) & " tarihinden geçerli " & Target & " gün " & " " & İZİN_TÜRÜ
End With
End Sub
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, [G5:O65536]) Is Nothing Then Exit Sub
On Error Resume Next
If Target <> Empty Then
With Target
.Comment.Delete
.AddComment
.Comment.Visible = False
.Comment.Shape.TextFrame.AutoSize = True
.Comment.Text Text:="""" & Cells(.Row, "B") & """ " & Target & " gün """ & " " & Cells(4, .Column)
End With
End If
End Sub