david000
10-04-2007, 08:05 PM
Private Sub CommandButton1_Click()
Dim r As Integer, c As Integer
r = Application.WorksheetFunction.Match(ComboBox1.Value, Range("Employees"), 0)
c = Application.WorksheetFunction.Match(MonthView1.Value, Range("Dates"), 0)
'How do you pass the Monthview controls value to the Match function?
Range("b2").Offset(r, c).Select
End Sub
For some reason I can't think of what the right answer is at the moment...
If I retrive the date off the worksheet this works fine but when I replace the range address with the ActiveX control it bugs out...
I'm just doing a super basic double lookup on a form.
Dim r As Integer, c As Integer
r = Application.WorksheetFunction.Match(ComboBox1.Value, Range("Employees"), 0)
c = Application.WorksheetFunction.Match(MonthView1.Value, Range("Dates"), 0)
'How do you pass the Monthview controls value to the Match function?
Range("b2").Offset(r, c).Select
End Sub
For some reason I can't think of what the right answer is at the moment...
If I retrive the date off the worksheet this works fine but when I replace the range address with the ActiveX control it bugs out...
I'm just doing a super basic double lookup on a form.