Excel Tips and Tricks || Excel VBA Tips


Excel Tips and Tricks || Excel VBA Tips

‘Code 1
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Range(“D3:H16”)) Is Nothing Or Target.Cells.Count > 1 Then Exit
Sub
Selection.Interior.Color = RGB(0, 255, 0)
Selection.Value = “B”
End Sub

‘Code 2
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Intersect(Target, Range(“D3:H16”)) Is Nothing Or Target.Cells.Count > 1 Then Exit
Sub
Selection.Interior.Color = RGB(255, 255, 255)
Selection.Value = “P”
End Sub


0 responses on "Excel Tips and Tricks || Excel VBA Tips"

Leave a Message

Your email address will not be published. Required fields are marked *

© 2020 Tanvir Academy. All rights reserved. DESIGN & DEVELOP BY ~ Soft IT Care
X