Hi There,
Need your help please.
I need to be able to run some vba code every time a choice is made from a dropdown.
Is that doable?
Best Regards,
Steve.
Hi There,
Need your help please.
I need to be able to run some vba code every time a choice is made from a dropdown.
Is that doable?
Best Regards,
Steve.
Hi SteveW,
Yep, that is doable. Your code goes behind the sheet that has the dropdown on it. You then write "Event" code that checks if that cell changes and if it does, then the macro is triggered.
Example: If you are checking a dropdown in cell B5 then the code looks like this:
Search the net for more examples of Event code like: https://www.thesmallman.com/vba-worksheet-change-eventsPlease Login or Register to view this content.
One test is worth a thousand opinions.
Click the * Add Reputation below to say thanks.
Hi Marvin,
Thanks for the post.
That looks good.
I have an issue though as the dropdown is in every cell of the column.
I have a sheet of phone numbers and after the phone call I mark the call with a value from the dropdown on the same row.
Can a function be called when I do not know what cell the dropdown is in?
Thanks for the help.
Best Regards,
Steve.
Hey Steve,
Instead of checking for a single cell like Cells(5,"B") you check for the entire column "Columns("B")" to fire YourMacro. NOW the "Target" can be passed to the macro and you can pick off which row that target was on, using Target.Row .
See the example and change anything in column B.
VBA Passing Parm to other Sub.xlsm
Hi Marvin,
Perfect, Thank You.
And thanks for the demo, I appreciate it.
Best Regards,
Steve.
Hi There,
Due to the help I have received I am making good progress with this but …
I have a few gotcha's. I only want to call the function if the cell is originally blank because I do not want to it to count if I have already chosen an outcome from the dropdown.
Is there a way to check that the cells original value is blank and then call the function?
Thanks for the help.
Best Regards,
Steve.
Hi Steve,
Something like this?
Please Login or Register to view this content.
Hi Marvin,
Thanks for the quick reply.
It's not quite right so I think I have not explained correctly by me. Sorry.
In the dropdown I have 4 values and one of them is picked as the status/result of the telephone call that was just made. So if I select "No Interest" I do not want to be able to select a different out come later.
The cell is originally blank so when I first select the dropdown I would like to know the value was originally blank and not "No Interest".
Hope that makes sense.
Best Regards,
Steve.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks