Thread: For Each Next
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Charlie Charlie is offline
external usenet poster
 
Posts: 703
Default For Each Next

Are you performing those actions on the wksht object? i.e. wksht.cells or
wksheet.range, etc.?

"Darrin Henshaw" wrote:

At least I don't get the error now. But what does happen is that the
actions I need to perform are only happening in the activeworksheet, not
any of the others. Here's an update to the code:

Dim wksht As Worksheet
Application.ScreenUpdating = False

For Each wksht In ActiveWorkbook.Worksheets

Point to note, this same thing happens if I use Sheets, instead of the
ActiveWorkbook. Thanks.

*** Sent via Developersdex http://www.developersdex.com ***