Anyone
Having two worksheets. from 1st worksheet already value has been searched. now i want to find the same value in another worksheet
when i click on chkbox1_Click i activate another sheet. works fine uptil here but
error comes "Object Variable or with Block Variable not set with the following line
wkTwoSheet.Rows(FindRow.Row).Select
Below is the code
How to see or hilite the row number without error ?
Thankx
NimishK
Having two worksheets. from 1st worksheet already value has been searched. now i want to find the same value in another worksheet
when i click on chkbox1_Click i activate another sheet. works fine uptil here but
error comes "Object Variable or with Block Variable not set with the following line
wkTwoSheet.Rows(FindRow.Row).Select
Below is the code
Rich (BB code):
Private Sub chkbox1_Click()
Dim wkTwoSheet As Worksheet
Set wkTwoSheet = Worksheets(uf1.txtCoSheetName.Text)
wkTwoSheet.Activate
Dim diffRange As Range
Dim SearchRange As Range
Dim FindRow As Range
Set SearchRange = wkTwoSheet.Range("B3", Range("A65536").End(xlUp))
Set FindRow = wkTwoSheet.Range("B3").Find(what:=uf1.txtSrchVal.Text, LookIn:=xlValues, lookat:=xlWhole)
wkTwoSheet.Rows(FindRow.Row).Select
'Error for the above line ..... Rows(FindRow.Row).Select Object Variable or with Block Variable not set
End Sub
Thankx
NimishK
Last edited: