Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default Run-time Error: '438'

Why doesn't this work:

For Each wb In Workbooks
'Test to see if wb's name is like "*C&A PF*.xlsm"
If wb.Name Like "*C&A PF*.xlsm" Then
With wb
CDLastRow = .Sheets("Catalyst Dump").Range("A" & Rows.Count) _
& .End(xlUp).Row
.Worksheets("Catalyst Dump").Columns("D").ColumnWidth = 18
End With
End If
Next

The line starting with CDLastRow is giving me the error. Object doesn't
support this property or method.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Run-time Error: '438'

hi
try this syntax..

CDLastRow = .Sheets("Catalyst Dump").Range("A" & Rows.Count) _
.End(xlUp).Row

basicily, loose the ampersand.
regards
FSt1

"Bishop" wrote:

Why doesn't this work:

For Each wb In Workbooks
'Test to see if wb's name is like "*C&A PF*.xlsm"
If wb.Name Like "*C&A PF*.xlsm" Then
With wb
CDLastRow = .Sheets("Catalyst Dump").Range("A" & Rows.Count) _
& .End(xlUp).Row
.Worksheets("Catalyst Dump").Columns("D").ColumnWidth = 18
End With
End If
Next

The line starting with CDLastRow is giving me the error. Object doesn't
support this property or method.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Run-time Error: '438'

You're not concatenating a string he

CDLastRow = .Sheets("Catalyst Dump").Range("A" & Rows.Count) _
.End(xlUp).Row

The space-underscore is the continuation character for extending one logical
line of code to two physical lines.

Bishop wrote:

Why doesn't this work:

For Each wb In Workbooks
'Test to see if wb's name is like "*C&A PF*.xlsm"
If wb.Name Like "*C&A PF*.xlsm" Then
With wb
CDLastRow = .Sheets("Catalyst Dump").Range("A" & Rows.Count) _
& .End(xlUp).Row
.Worksheets("Catalyst Dump").Columns("D").ColumnWidth = 18
End With
End If
Next

The line starting with CDLastRow is giving me the error. Object doesn't
support this property or method.


--

Dave Peterson
Reply
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
Error handling error # 1004 Run-time error [email protected] Excel Programming 3 May 20th 08 02:23 PM
Run time error '438'. Object doesn't support this property or meth MichaelDavid Excel Programming 2 February 29th 08 09:09 AM
Run-time error '438': Object doesn't support this property of meth abdrums Excel Programming 2 June 25th 07 07:19 PM
run-time error '438' ermeko Excel Programming 2 January 28th 06 03:23 PM
error '438' Alex Excel Programming 0 September 9th 05 05:38 PM


All times are GMT +1. The time now is 10:06 PM.

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"