What is the syntax for an inputbox that returns a range?

Dim <range name> As Range
Set <range name> = Application.InputBox(Prompt:= “<your message to be displayed>”, Title:= “<your title>”, Type:=8)
‘examples
Dim myRange As Range
Set myRange = Application.InputBox(Prompt:="Select Any Range", Title:="Demo", Type:=8)
myRange.Select

unnamed (2).jpg

 

 

Advertisements