How do make a macro activate the next sheet?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




I have a macro that i want to run in many files that have the same
structure but diferent number of sheets. I can only change sheets by
writing:

Sheets("Sheet1").Activate

I would like to know if there is a command that would work, something
like:

ActiveSheet.Activatenext (I tried this and didn't work)

Can someone tell me how to do this?


--
pauloreiss
------------------------------------------------------------------------
pauloreiss's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=29820
View this thread: http://www.excelforum.com/showthread.php?threadid=497860

.



Relevant Pages

  • Re: Macro running when a cell is exited
    ... change sheets or change workbooks. ... > Like in access u can get it to run a macro automatically when a cell is ... > exited, is this possible in excel, e.g. say when the cursor leaves cell C4 ...
    (microsoft.public.excel.misc)
  • Re: How do make a macro activate the next sheet?
    ... (remove nothere from email address if mailing direct) ... > I have a macro that i want to run in many files that have the same ... I can only change sheets by ...
    (microsoft.public.excel.programming)
  • Re: Using define with variable values
    ... The fopen line was just an example, the actual use of the macro is ... diferent. ... dmpfile line. ... Prev by Date: ...
    (comp.lang.c)
  • Re: matlab to excel
    ... I've used the following format for the topic arg to ddeinit: ... Haven't found a way to change sheets in the ddepoke command. ... Prev by Date: ...
    (comp.soft-sys.matlab)