Thread
:
Find and offset in named Range
View Single Post
#
4
Posted to microsoft.public.excel.programming
[email protected]
external usenet poster
Posts: 13
Find and offset in named Range
okay, DANGIT!
why wouldn't this work:
Dim NAME as Variant
NAME = Range("MYRANGE").Find(What:=Me.cboPhone_Number.Val ue).Offset(-2,
0)
BUT for some reason if the 2 is positive the whole thing works!
How can I get around this?
wrote:
YAY!!!!!!!!!!!!!!!!!!!
It's fixed! I've been working on this forEVER and I didn't even think
to do that!
Thank you so much Charles!
Thank you thank you!!!
Michelle :)
Die_Another_Day wrote:
If PROJECTTITLE is dimmed as a range then eliminate the .value at the
end of the statement, if it is dimmed as a string or variant, then
eliminate the "Set" statement at the beginning.
HTH
Charles Chickering
wrote:
I have a userform that allows users to select from a combo box the
title of a project they want to open. There is also a combo box to
select the work order number. The range "DATA" is a set of information
organized with the project title and work order number 6 cells below
it.
If Me.cboProject_Title_Select.Value = "" Then
Set PROJECTTITLE =
(Range("DATA").Find(What:=Me.cboWork_Order_Number_ Select.Value).Offset(-6,
0).Value)
WORKORDER = Me.cboWork_Order_Number_Select.Value
Else
If Me.cboWork_Order_Number_Select.Value = "" Then
Set WORKORDER =
Range("DATA").Find(What:=Me.cboProject_Title_Selec t.Value).Offset(6, 0)
PROJECTTITLE = Me.cboProject_Title_Select.Value
End If
I keep getting an Error 1004 message on:
Set PROJECTTITLE = (Range("DATA").Find_
What:=Me.cboWork_Order_Number_Select.Value).Offset (-6, 0).Value)
What is wrong with my code? arg!
Reply With Quote
[email protected]
View Public Profile
Find all posts by
[email protected]