I have a dropdown list ''' in cell C6 ''''' , the list contains 5 choices (screwing, wave, troubleshooting, AQ, and packaging) I want the macro BDdevis to run automatically every time I change the choice in this list.
place this macro in the sheet and every time the list in C6 changes, the macro will run (check the spelling of the macro name)
Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Target, Range("C6")) Is Nothing Then Call BDdevis End If End Sub
NASRAOUI
Thank you very much, it works as it should now.
michel_m
Contributor
And I smell the pâté?
M-12
Hello Michel.m
But no, your message has probably been seen and understood
After that, if you're waiting for thanks from all the people you're helping out, well for some, you just have to take note of them and ignore them afterwards.
Raymond PENTIER
Contributor
Hello.
Drop-down lists are designed to choose a data. Once this data is displayed, you are free to do what you want with it. But the drop-down list cannot display either a formula, or a hyperlink, or a macro. -- Retirement is great! Especially in the Caribbean... Raymond (INSA, AFPA)
michel_m
Contributor
Hello,
Raymond said
"But the dropdown list cannot display either a formula, or a hyperlink, nor a macro."
Oh really?
Option Explicit '------------------------------------ Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$F$2" Then MsgBox "hello" End Sub
macro to be installed in the concerned sheet module