Hello All,
I am building a macro for collecting information from several different workbooks with similar information, but different formats (eg. product numbers from bids from many different companies).The information can be either part of a cell, the entire cell, or spread across several cells.
The problem is when using an App.Inputbox with both Type 2 (text) and type 64 (array).
When selecting a multi-cell range (should be treated as an array), the inputbox returns it as a string containing the value of the first cell only. When using only a type=2 box and selecting a range, the same error occurs.
Q: How can I get a user input that allows both array selection and manual entry?
Better seen than explained so here's the code...
Windows 7, Office 2010
I am building a macro for collecting information from several different workbooks with similar information, but different formats (eg. product numbers from bids from many different companies).The information can be either part of a cell, the entire cell, or spread across several cells.
The problem is when using an App.Inputbox with both Type 2 (text) and type 64 (array).
When selecting a multi-cell range (should be treated as an array), the inputbox returns it as a string containing the value of the first cell only. When using only a type=2 box and selecting a range, the same error occurs.
Q: How can I get a user input that allows both array selection and manual entry?
Better seen than explained so here's the code...
Code:
Sub AppInputBox_Headache()
Debug.Print "Begin AppInputBox_Headache()"
Dim varInput As Variant
varInput = Application.InputBox("Please Select or Type the info.", _
Type:=2 + 8 + 64)
Debug.Print TypeName(varInput)
Debug.Print varInput
Debug.Print "End AppInputBox_Headache()"
End Sub
Windows 7, Office 2010
Last edited: