Activate a Macro each time I use a Validation List in Excel -


i have validation list selects different countries. each country has different sellers , have make validation list them too. problem have run macro manually (with button) each time select different country. want macro run/activate each time use country validation list , not manually(button).

i don't think of code i'm using needed solve problem. i'll post last part anyway.

dim strformula1 string  strformula1 = "=$z$1:" & worksheets("graficos").range("z1").end(xldown).address()   selection.validation     .delete     .add type:=xlvalidatelist, alertstyle:=xlvalidalertstop, operator:= _     xlbetween, formula1:=strformula1     .ignoreblank = true     .incelldropdown = true     .inputtitle = ""     .errortitle = ""     .inputmessage = ""     .errormessage = ""     .showinput = true     .showerror = true end 

call macro inside worksheet_change event handler in worksheet class module.

on worksheet tab @ bottom, right-click , choose view code. opens vb editor, showing code pane of worksheet.

in there, select worksheet objects drop-down @ top-left, , change events drop-down @ top-right.

in event-handler, paste code call macro


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -