Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here's my code
Private Sub CommandButton2_Click() myvar= Application.InputBox("Enter Search Criteria", "Search", "Enter Here") Workbooks.Open ("c:\Otherbook.xls") With Workbooks("c:\Otherbook.xls").Worksheets("sheet1") .Range("c2:c10") Set ref = .Find(myvar) End With Response = MsgBox(ref, vbYesNo, "Test") End Sub I need my command button to search a range from c2:c10000 on a different workbook for matching info and then return the entire row where the match was made. There will be multiple matches and each one needs to be returned. This is a test code for myself to see if the search will return a value and I get Run-Time error '9': Subscript out of range. Please Help |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
subscript out of range | Excel Programming | |||
9: Subscript out of range | Excel Discussion (Misc queries) | |||
Subscript out of Range | Excel Programming | |||
Subscript out of range | Excel Programming | |||
Subscript out of range | Excel Programming |