It is all on one line. It errors, the same error as before, still. Do I need
to declare Ndx as a global variable?
"Chip Pearson" wrote:
I should have added that
For Ndx = ActiveSheet.Index + 1 To
Worksheets(Worksheets.Count).Index
should all be on a single line of code.
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Michael from Austin"
wrote in message
...
I received a Run Time Error 424. "Object Required."
"Chip Pearson" wrote:
Michael,
Try something like the following:
Dim Ndx As Integer
For Ndx = ActiveSheet.Index + 1 To
Worksheets(Worksheets.Count).Index
Worksheets(Ndx).Range("A1").Value = 123
Next Ndx
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Michael from Austin"
wrote in message
...
I have a macro that I want to have also run on the next
worksheet and then
the next until there are no more worksheet. The worksheets
have
names. I do
not want it to have to look for the name and then open it. I
just want it to
go to the next one and then the next until the end... Can
this
be done. Any
help would be appreceited.....
--
Regards,
Michael