Object Required - My Brain is Obviously Not Working

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top