Excel 2010 VBA Tutorial 16 - Select Case (Switch) Statement

preview_player
Показать описание
How to use a Select Case Statement to control your programs flow.
Рекомендации по теме
Комментарии
Автор

Thanks, makes sense. By the way, love your series of videos. I am finally understanding.

sirhch
Автор

Do you have a video that shows how to pull numbers from an excel sheet and reference them in the module?

travisstraub
Автор

Great video.  I would like to do something like this for work where I give the user a range of weeks and tick boxes so that they can either choose a block of weeks, an individual week, non-contiguous weeks, etc.  Feels like I'm getting closer to being able to do this and seeing other options, possibilities, etc to let me design my booking form.

colina
Автор

I've noticed hat the input is case sensitive and msgbox will only pop up if correct case. IS thre away to remove the case sensitivity?

DominicChin
Автор

wooops, rookie mistake, It still works because you don't actually need to declare variables in VBA so when I used the second spelling it created a new variable for me. This is inefficient though and not declaring your variables is a bad habit to get into. I normally put "option explicit" at the top of my modules to enforce the use of variable declaration.

YourprogrammingnetworkCoUk
Автор

noticing that these responses are case sensitive... How would I get around that?

ronaldtroncoso
Автор

thank you. the videos r great. but how do you make it to go back to the message box asking for a mode of transport once case else msgbox appears n you click ok?

BurhanuddinPlasticwala
Автор

hi. i love your videos. i have a question for this particular video. the selections are case sensitive. what is the code to make the selection not case sensitive. thanks.

etpangilinan
Автор

Noticed that userChoise in the dim was spelled differently than userChoice in the rest of the code. Obviously a typo ... but it still worked. What was going on to get it to work?

sirhch
Автор

how to use select case with combo box?

vinzerbanned
Автор

way too so much fun in watching your tutorial

BabyYodaMin
Автор

I don't understand: you typed in "Dim UserchoiSe as String" (first line) but then refer to "userChoiCe" ?
It makes me think no one actually cares about the Dim part since the computer doesn't see a "dim" for userChoice and yet it works. Without the "declaration of variable", the same thing would have happened and the macro would have worked jyst fine, right?

richardzarken
Автор

Loving your tutorials mate! Thanks a lot :) Easy to follow and well-structured. Spelling helicopter is a bitch tho :D

Crussifiance