Dropdown in message box

Danette -  
 Danette -
Hello,

I have a "little" problem with my macro.

I would like to choose a variable corresponding to a tab in my sheet every time I run it.
I'm not sure if you have a simpler idea than mine, but here's what I was thinking:

In my macro, I will create a variable, which I will call "variable" for example, corresponding to the name of the tab I want to reference.
Instead of typing the name of the tab I want to define for my variable (since a typo can easily happen), I would like a message box to open so that I can select the name of my sheet from a drop-down list.

The only issue is that I don't know how to create a drop-down list in a message box, or maybe it's just not possible. Perhaps there's another solution that hasn't yet come to my mind.

Feel free to contact me for questions or clarifications on my issue.

Thank you for your responses.

1 answer

  1. michel_m Posted messages 18903 Registration date   Status Contributor Last intervention   3 320
     
    Hello
    to do this, you need to use a userform with a combobox

    if it's Chinese to you
    https://excel.developpez.com/cours/?page=prog#userform

    try it and if you mess up, come back and see us

    --
    Michel
    0
    1. Danette
       
      Indeed, it's Chinese to me ^^
      I will study this more closely, thank you very much
      0