New Member
January 14, 2023
I have a query for Excel VBA actually.
I have a dropdown list in cell A2 of excel sheet like selecting, A, B, C and D, and also have cells E to H in Excel Worksheet, I want logic to work automatically wherein, when user selects anything from A, B, C only. Values in Cells E to H should get cleared off automatically.
I have used VBA code at worksheet level like Worksheet Activate or Selection Change event to do this. But it is creating issues like Continuous screen flickering of that particular worksheet.
Regards,
CHEMCIAl
Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
PowerPoint
November 8, 2013
Hi Sharad,
You should use the Workbook_Change event, with a condition to monitor columns A,B,C, but make sure you disable events, otherwise clearing cells is also triggering the change event:
If Target.Column<4 then
Application.Enableevents=false
Range("E" & Target.Row & ":H" & Target.Row).ClearContents
Application.Enableevents=True
End If
1 Guest(s)