I know how to write code to start looping through all worksheets and do a action, but how would I write code to stop the looping at a specific worksheet
I know how to write code to start looping through all worksheets and do a action, but how would I write code to stop the looping at a specific worksheet
This is one way. Change the sheet name to suit.
![]()
For Each ws In Worksheets 'Your code here If ws.Name = "Sheet5" Then Exit For Next ws
Surround your VBA code with CODE tags e.g.;
[CODE]your VBA code here[/CODE]
The # button in the forum editor will apply CODE tags around your selected text.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks