Hi,
On a userform I have a combobox filled with weeks. Now I want to find the rownumber in a defined range that have the value selected in the combobox.
The problem is I get an error if I use the "select property" to define the range I want to search.
Can someone help me with the code below.
Thx in advance
Aga
Dim Wk As String
Wk = UserForm1.Week.Text
Range("'INPUT'!E2:E100").Select
Selection.Find(What:=Week, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Selection.FindNext(After:=ActiveCell).Activate
i = ActiveCell.Row
On a userform I have a combobox filled with weeks. Now I want to find the rownumber in a defined range that have the value selected in the combobox.
The problem is I get an error if I use the "select property" to define the range I want to search.
Can someone help me with the code below.
Thx in advance
Aga
Dim Wk As String
Wk = UserForm1.Week.Text
Range("'INPUT'!E2:E100").Select
Selection.Find(What:=Week, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Selection.FindNext(After:=ActiveCell).Activate
i = ActiveCell.Row