View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jan Karel Pieterse Jan Karel Pieterse is offline
external usenet poster
 
Posts: 535
Default LOOP BETWEEN "FRONT" AND "END" SHEETS?

Hi Lonnie,

Dim WS As Worksheet
For Each WS In Worksheets
If WS.Name < "Front" OR WS.Name < "End"
'Code to insert data
End If
Next


This will add the info to any sheet, because

1. the If clause always yields true (needs to be AND, not OR)
2. Sheets before and after Front and end are also accepted.

Regards,

Jan Karel Pieterse
Excel MVP
www.jkp-ads.com