Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to design a module where the user would insert a number in the
search box and when the user presses the search button it would populate the respective text boxes. The textboxes are on a UserForm. In the following code when running I get the following error "Object variable or with block variable not set". Any help would be greatly appreciated and a big thank you. Private Sub cmdSearch_Click() Dim wrkSheet As Worksheet Dim wrkRng As Range Dim intRow As Integer Set wrkSheet = Worksheets("DataFile") With wrkSheet Set wrkRng = wrkSheet.Columns(1).Find(txtLocSrch) intRow = wrkRng.Row <=============== Error Line wrkSheet.Cells(intRow, 1) = txtLocation wrkSheet.Cells(intRow, 2) = txtHost wrkSheet.Cells(intRow, 3) = txtDistrict wrkSheet.Cells(intRow, 4) = txtRespClass End With Set wrkSheet = Nothing -- Larry E. Brueshaber |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Searching, matching then searching another list based on the match | Excel Discussion (Misc queries) | |||
excel searching | Excel Worksheet Functions | |||
Searching Excel for a value | Excel Worksheet Functions | |||
Searching within excel | Excel Programming | |||
Searching in excel | Excel Programming |