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: 23
Default Loop Question

I'm trying to loop through a workbook, test to see if the worksheet name is
numeric, and if so go to a subroutine(MoveData), if not, continue to the next
worksheet. I tried the following but can't get it to work, it has a problem
with the Next line. Anyone have any ideas?

Thanks, Alan

Sub Move_All_Data()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Select
If IsNumeric(ActiveSheet.Name) Then
MoveData
Else
Next ws
End Sub
 
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
Loop question N.F[_2_] Excel Discussion (Misc queries) 0 July 12th 07 08:02 PM
end with loop question Lee Hunter Excel Programming 2 November 3rd 05 08:14 PM
loop question choice[_2_] Excel Programming 7 October 30th 05 05:41 AM
One more loop question Patti[_5_] Excel Programming 11 June 6th 04 07:14 AM
another loop question Patti[_5_] Excel Programming 5 May 31st 04 07:43 AM


All times are GMT +1. The time now is 04:15 PM.

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

About Us

"It's about Microsoft Excel"