I have a code in VBA, where with help of inputBox method user is able to select a cell, a range. But I need to have an inputBox where user is able to select multiple cell ranges, ( not with help of Selection method!!) then to split each cell value.
code is below
Set Group = Application.InputBox(prompt:="Select a cell to be expanded", Left:=100, Type:=8)
Dim str_group As String
Debug.Print Split(str_group, ":")(0)
type:=8 give ability to select only a cell, Mcrsteven if user selects multiple cells, it only reads first cell range(address) I need to see after : and to be able to read it.
Try this article by Microsoft official website.
In my case the below code worked just fine.
Debug output was
$A$4:$C$11as I selected those cells. Hope this is helpful ...