This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 4th, 2013  |  syntax: None  |  size: 0.24 KB  |  views: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Dim i as integer
  2. For i = X+1 to Y-1
  3.    Sheets(i).Select
  4.     .... your code
  5. Next i
  6.        
  7. Dim i As Integer
  8. Dim wrksheet As Worksheet
  9.  
  10. For i = 1 To Sheets.Count
  11.     Set wkrsheet = ThisWorkbook.Sheets(i)
  12.     'Do work on wrksheet object
  13. Next i
clone this paste RAW Paste Data