Dear Experts,
I have a ComboBox1 with fillrange: A12:A376 and linkedcell: D1
my ComboBox1 has this code Range("D1").Value = ComboBox1.Value
Note: range A12:A376 has number value from 1 to 365
I need a code that scroll to a row after a Match as code below
-----------------
Private Sub ComboBox1()
Dim myRange As Range
Dim myRow As Variant
Set myRange = Range("A12:A376")
myRow = Application.Match("E1", myRange, False)
If Not IsError(myRow) Then
ActiveWindow.ScrollRow = myRow
' and then select/activate the cell:
Application.GoTo Cells(myRange, myRow)
Else
' The value is not found in the range, so inform you:
MsgBox "Not found!"
End If
End Sub
---------------
the code only excute the MsgBox
Please any help.
Thanks in advance,
12Rev79
I have a ComboBox1 with fillrange: A12:A376 and linkedcell: D1
my ComboBox1 has this code Range("D1").Value = ComboBox1.Value
Note: range A12:A376 has number value from 1 to 365
I need a code that scroll to a row after a Match as code below
-----------------
Private Sub ComboBox1()
Dim myRange As Range
Dim myRow As Variant
Set myRange = Range("A12:A376")
myRow = Application.Match("E1", myRange, False)
If Not IsError(myRow) Then
ActiveWindow.ScrollRow = myRow
' and then select/activate the cell:
Application.GoTo Cells(myRange, myRow)
Else
' The value is not found in the range, so inform you:
MsgBox "Not found!"
End If
End Sub
---------------
the code only excute the MsgBox
Please any help.
Thanks in advance,
12Rev79