I am a newbie. I'm trying to write a macro to loop through all of the sheets
in a workbook and return the cursor to the home (A1) position. Seems like it
should be fairly simple to me, but I just can't get it to work. Thanks for
your help.
I am a newbie. I'm trying to write a macro to loop through all of the sheets
in a workbook and return the cursor to the home (A1) position. Seems like it
should be fairly simple to me, but I just can't get it to work. Thanks for
your help.
ummm why do you want to loop through the sheets just to end at the begin? I have some code that might work. what it does is loop through all the sheets and tries to find and item and then returns back to the home sheet. let me know.
Try this,
Sheets.Select
Range("a1").Select
sheets(1).select
Regards,
Shah Shailesh
http://members.lycos.co.uk/shahweb/
(Excel Add-ins)
*** Sent via Developersdex http://www.developersdex.com ***
Set sh = activesheet
For Each sh1 In Worksheets.Count
sh1.ACtivate
Range("A1").Select
Next sh1
sh.Activate
--
HTH
RP
(remove nothere from the email address if mailing direct)
"CassieM" <CassieM@discussions.microsoft.com> wrote in message
news:0B507E93-D065-4E6E-83C6-DD7EE270B305@microsoft.com...
> I am a newbie. I'm trying to write a macro to loop through all of the
sheets
> in a workbook and return the cursor to the home (A1) position. Seems like
it
> should be fairly simple to me, but I just can't get it to work. Thanks
for
> your help.
try this. No loop
Sub fixsheets()
Sheets.Select
Range("a1").Select
Sheet1.Select
End Sub
--
Don Guillett
SalesAid Software
donaldb@281.com
"CassieM" <CassieM@discussions.microsoft.com> wrote in message
news:0B507E93-D065-4E6E-83C6-DD7EE270B305@microsoft.com...
> I am a newbie. I'm trying to write a macro to loop through all of the
sheets
> in a workbook and return the cursor to the home (A1) position. Seems like
it
> should be fairly simple to me, but I just can't get it to work. Thanks
for
> your help.
Thank you all so much. I can see my beginner's error now!
"Don Guillett" wrote:
> try this. No loop
>
> Sub fixsheets()
> Sheets.Select
> Range("a1").Select
> Sheet1.Select
> End Sub
> --
> Don Guillett
> SalesAid Software
> donaldb@281.com
> "CassieM" <CassieM@discussions.microsoft.com> wrote in message
> news:0B507E93-D065-4E6E-83C6-DD7EE270B305@microsoft.com...
> > I am a newbie. I'm trying to write a macro to loop through all of the
> sheets
> > in a workbook and return the cursor to the home (A1) position. Seems like
> it
> > should be fairly simple to me, but I just can't get it to work. Thanks
> for
> > your help.
>
>
>
glad to help
--
Don Guillett
SalesAid Software
donaldb@281.com
"CassieM" <CassieM@discussions.microsoft.com> wrote in message
news:1413EAE9-040C-4037-B1B5-1161FE43AA60@microsoft.com...
> Thank you all so much. I can see my beginner's error now!
>
> "Don Guillett" wrote:
>
> > try this. No loop
> >
> > Sub fixsheets()
> > Sheets.Select
> > Range("a1").Select
> > Sheet1.Select
> > End Sub
> > --
> > Don Guillett
> > SalesAid Software
> > donaldb@281.com
> > "CassieM" <CassieM@discussions.microsoft.com> wrote in message
> > news:0B507E93-D065-4E6E-83C6-DD7EE270B305@microsoft.com...
> > > I am a newbie. I'm trying to write a macro to loop through all of the
> > sheets
> > > in a workbook and return the cursor to the home (A1) position. Seems
like
> > it
> > > should be fairly simple to me, but I just can't get it to work.
Thanks
> > for
> > > your help.
> >
> >
> >
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks