LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
runtime error 434, object does not support this method or property Janis Excel Discussion (Misc queries) 4 January 17th 08 04:10 PM
help with my code please. (Error: Object doesn't support this property or method) funkymonkUK[_137_] Excel Programming 5 April 6th 06 03:44 PM
Email error Object dosen't support this property or method Steved Excel Programming 10 August 31st 05 11:25 PM
Object doesn't support this property or method (Error 438) Kiran Excel Discussion (Misc queries) 1 July 12th 05 08:42 PM
Run Time Error 438 - Object doesn't support the property or method Paul Cottier Excel Programming 0 September 10th 04 01:27 AM


All times are GMT +1. The time now is 05:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"