Input boxes

We introduced you to input boxes when we first started talking about dialog boxes.

Is there much more we need to say about the humble input box? Let’s have a look at what Excel VBA help has to say shall we (“Alt F11” followed by “F1”)? It’s a VBA macro developer’s best friend.

Input boxes can be used to select a range of cells

You can tell input boxes to expect a range

Did you know that you can use ask users to input a range? Excel’s help shows you how:

Here’s some code where we’re doing it for ourselves:


    'Establish variable
    Dim ThisIsMyRange As Range
    'Use input box to ask user to input a range
    Set ThisIsMyRange = Application.InputBox(prompt:="Please select a range", Type:=8)

About this online Excel course material

You’re looking at a free online course extract covering different kinds of Excel macro dialog boxes.

...join the conversation...

Your email address will not be published. Required fields are marked *