Home |
Search |
Today's Posts |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run-time error '438': Object doesn't support this property of
Thanks Pete.
" wrote: On Jun 25, 11:35 am, abdrums wrote: The line that start with "Set cRange" (last line) in this code gave me a Run-time error '438': Object doesn't support this property or method. Anybody can help me? Will be appreaciated, thanks. Set wsStandards = Workbooks.Open(Filename:=stFullName) Set wsSystem = ThisWorkbook.Sheets(TextBox1.Text) 'Set wsStandards = Sheets("Standards") wsSystem.Activate nLastRow = wsSystem.Cells(nFirstRow, 2).End(xlDown).Row nLastRow2 = wsSystem.Cells(nFirstRow, 2).End(xlDown).Row vCompType = wsSystem.Range(wsSystem.Cells(nFirstRow, 2), wsSystem.Cells(nLastRow, 2)) vStanType = wsSystem.Range(wsSystem.Cells(nFirstRow, 11), wsSystem.Cells(nLastRow, 11)) For m = 1 To nLastRow + 1 - nFirstRow If InStr(1, CStr(vStanType(m, 1)), "NC", vbTextCompare) = 0 Then Set cRange = Nothing Set cRange = wsStandards.Columns("B").Find(What:=CStr(vCompType (m, 1)), After:=wsStandards.Cells((nFirstRow - 1), 2), _ LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:=False) I think that your problem comes from having the 3rd line commented out so wsStandards is a workbook not a worksheet. Pete |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
runtime error 434, object does not support this method or property | Excel Discussion (Misc queries) | |||
help with my code please. (Error: Object doesn't support this property or method) | Excel Programming | |||
Email error Object dosen't support this property or method | Excel Programming | |||
Object doesn't support this property or method (Error 438) | Excel Discussion (Misc queries) | |||
Run Time Error 438 - Object doesn't support the property or method | Excel Programming |