LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default alternative required; Fo Each Loop

I suspect that the following bit of code is causing problems - not
causing an arror - just stopping the macro part way through without an
error. Does anyone know any other ways of coding the follow, I suspect
it is the for Each loop causing the problems:

Any help appreciated
Jason

'====================================
For Each mySheet In myStorageBook.Worksheets

'check to see if the storage sheet is being used
'if it isn't then delete it
If mySheet.Range("C2") = "Empty" Then
Application.DisplayAlerts = False
mySheet.Delete
Application.DisplayAlerts = True
Else
If mySheet.Name < "Input" And mySheet.Name < "Summary"
Then
mySheet.Range("D:G").EntireColumn.AutoFit
End If
End If
Next
'====================================
 
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
Test loop required LaDdIe Excel Programming 1 November 3rd 08 09:21 PM
Help required with 'FOR' Loop and Userforms Clinton M James Excel Programming 0 December 12th 07 12:47 PM
Help required with a simple Loop Pedros[_3_] Excel Programming 10 July 27th 06 12:57 PM
Excel VBA code required (for.......next loop) uplink600[_2_] Excel Programming 5 May 18th 04 10:08 AM
For....Next loop code required uplink600 Excel Programming 2 May 12th 04 04:03 PM


All times are GMT +1. The time now is 08:28 PM.

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

About Us

"It's about Microsoft Excel"