Cycling through

JimMcAlees

New Member
Joined
Mar 31, 2011
Messages
4
I am going crazy with a simple macro which will not go to the next sheet, it will change to first sheet but never move on to the next. I feel so dumb over this.

Sub Cyclethrough ()

Dim ws As Worksheet

For Each ws In ActiveWorkbook.Worksheets
Range("a1").select
next ws
End Sub
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Maybe

Code:
Sub Cyclethrough()

Dim ws As Worksheet

For Each ws In ActiveWorkbook.Worksheets
    Application.Goto ws.Range("A1")
Next ws
End Sub
 
Upvote 0
Peter, thanks for the suggestion but this gives me a "Method 'Goto' of object'_Application failed
This macro is way to simple not to work
 
Upvote 0
Nope... all 18 sheets are unprotected... I am beginning to think this may be a problem with my machine... thanks for your suggestions
 
Upvote 0
Peter I created a new blank workbook with 3 pages and this code worked fine... but it will not work in my actual spreadsheet. The file I have was created in a previous version... I am now running Excel 2010.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,711
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top