How to use VBA’s InputBox function to select a range on the fly in Excel

Automating the selection process isn’t difficult if you rely on VBA’s InputBox in Microsoft Excel.

Image: Andrey_Popov/Shutterstock

Often, you’ll want Excel users to specify a range that the app then uses in an automated way. Fortunately, Visual Basic for Applications’ InputBox function supports this task, so you won’t have to work very hard! You’ll learn how to select a range using InputBox in this article.

SEE: 83 Excel tips every user should master (TechRepublic)

I’m using Microsoft 365 on a Windows 10 64-bit system, but you can use earlier versions. Excel Online won’t support the VBA procedure in this article. Download the demonstration .xlsm, .xls, and .cls files to easily access the code.

What is InputBox?

VBA’s InputBox function is one of the most helpful functions you’ll use. It displays a dialog box and…

Keep reading the full content on the TechRepublic site.


Get Free Email Updates!

Signup now and receive an email once I publish new content.

I agree to have my personal information transfered to ConvertKit ( more information )

I will never give away, trade or sell your email address. You can unsubscribe at any time.

Spread the love

Leave a Comment