Repeating commands with a While...Wend loop

If you want to repeat a command while a particular condition holds true, use a While...Wend loop. For example:

str = InputBox "Please enter your name"

While Len(str) = 0

str = InputBox "You must enter at least one character, please try again" 

Wend

This rather unfriendly bit of code forces the user to type something into the InputBox.