اذهب الي المحتوي
أوفيسنا

اضافة تسمية توضيحية لخلية اكسيل


ammarhowari

الردود الموصى بها

جزاك الله خيراً

 

لكن المطلوب بدون قائمة منسدلة  
ممكن لو تنحل عن طريق كود او غير شي   بس بدون قائمة منسدلة 

رابط هذا التعليق
شارك

The request is weird a little and using data validation list is better than using the code in worksheet module

 Generally here's the code (In Worksheet Module)

Private Sub Worksheet_Change(ByVal Target As Range)
    Call Worksheet_SelectionChange(Target)
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    With Target
        If .Cells.CountLarge > 1 Then Exit Sub
        If .Row > 1 And .Column = 2 Then
            If LCase(.Value) = "yes" Or LCase(.Value) = "no" Then
                Application.EnableEvents = False
                    .Value = StrConv(.Value, vbProperCase)
                    .Font.ColorIndex = xlAutomatic
                Application.EnableEvents = True
                Exit Sub
            Else
                Application.EnableEvents = False
                    .Value = Empty
                Application.EnableEvents = True
            End If
            If .Value = "" And .Offset(, -1).Value <> "" Then
                Application.EnableEvents = False
                    .Value = "Type 'Yes' to accept - Type 'No' to reject"
                    With .Font
                        .Name = "Calibri"
                        .FontStyle = "Regular"
                        .Size = 9
                        .Color = RGB(217, 217, 217)
                    End With
                Application.EnableEvents = True
            End If
        End If
    End With
End Sub

 

  • Like 3
رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information