Here's my Code.
Private Sub CommandButton1_Click()
Dim FoundCell As Long
lCol = ActiveCell.Column
lRow = ActiveCell.Row
W_Num = ActiveSheet.Cells(lRow + 1, lCol)
FoundCell = Application.Match(W_Num, Range("Sheet2!A3:A100"), 0)
MsgBox (FoundCell.Row)
End Sub
My goal is to click a button on sheet 1 and match a value underneath where the person clicks on sheet1 with its corresponding match on sheet 2 (it will be in column A) and get that row value so I can change the K column cell of that row (on sheet 2) to the button's label (Planned in this case but there will be 5 different buttons labeling progress of production). With the current setup I keep getting error "method range of object _Worksheet" error. But I've also received type mismatch errors.
Private Sub CommandButton1_Click()
Dim FoundCell As Long
lCol = ActiveCell.Column
lRow = ActiveCell.Row
W_Num = ActiveSheet.Cells(lRow + 1, lCol)
FoundCell = Application.Match(W_Num, Range("Sheet2!A3:A100"), 0)
MsgBox (FoundCell.Row)
End Sub
My goal is to click a button on sheet 1 and match a value underneath where the person clicks on sheet1 with its corresponding match on sheet 2 (it will be in column A) and get that row value so I can change the K column cell of that row (on sheet 2) to the button's label (Planned in this case but there will be 5 different buttons labeling progress of production). With the current setup I keep getting error "method range of object _Worksheet" error. But I've also received type mismatch errors.