P
Paige
Have the following code tied to a userform, with a refedit. Works fine,
except that I need to store the column number selected by the end user for
future use and keep getting the 'object required' message on the "Set
LookupValuesColumn = InputRange.Column" line below. Know this is simple but
I'm just not getting it. Can someone please advise how to fix?
Private Sub SelectVLookupLookupValueContinue_Click()
Dim InputRange As Range
Dim InputSheet As Worksheet
Dim LookupValuesColumn As String
Set InputRange = Range(VLookupLookupValueColumnRefEdit.Text)
Set InputSheet = InputRange.Parent
Set InputRange = Application.Intersect(InputRange, InputSheet.UsedRange)
'Store column number for future use
Set LookupValuesColumn = InputRange.Column
Unload Me
End Sub
except that I need to store the column number selected by the end user for
future use and keep getting the 'object required' message on the "Set
LookupValuesColumn = InputRange.Column" line below. Know this is simple but
I'm just not getting it. Can someone please advise how to fix?
Private Sub SelectVLookupLookupValueContinue_Click()
Dim InputRange As Range
Dim InputSheet As Worksheet
Dim LookupValuesColumn As String
Set InputRange = Range(VLookupLookupValueColumnRefEdit.Text)
Set InputSheet = InputRange.Parent
Set InputRange = Application.Intersect(InputRange, InputSheet.UsedRange)
'Store column number for future use
Set LookupValuesColumn = InputRange.Column
Unload Me
End Sub