Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Object Required - My Brain is Obviously Not Working

Drop the Set:

LookupValuesColumn = InputRange.Column

also:

1. consider Dim'ing LookupValuesColumn as Long
2. consider storing it in a cell or Dim'ing it in a static or public location.
--
Gary''s Student - gsnu200857


"Paige" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please Help! Object Required suddenly, was working before! Duncan[_5_] Excel Programming 2 July 11th 06 11:50 AM
Object Required Jim Thomlinson Excel Programming 1 March 27th 06 12:07 AM
Object Required JMB Excel Programming 0 March 26th 06 11:58 PM
Object required? Tony Excel Programming 2 March 22nd 05 04:52 PM


All times are GMT +1. The time now is 01:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"