Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Right One Sheet
I need to write a macro that makes the code go one sheet to the right. Normally i would just select Sheets("Sheetname").select but this macr will be used to add more sheets in. Any Ideas -- chalk ----------------------------------------------------------------------- chalky's Profile: http://www.excelforum.com/member.php...fo&userid=2375 View this thread: http://www.excelforum.com/showthread.php?threadid=56327 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Right One Sheet
Try something like
Sub AAA() On Error Resume Next If Not ActiveSheet.Next Is Nothing Then ActiveSheet.Next.Activate Else Sheets(1).Activate End If End Sub This will select the sheet to the right, if there is one. If you're at the last sheet, it will loop around to the first sheet. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "chalky" wrote in message ... I need to write a macro that makes the code go one sheet to the right. Normally i would just select Sheets("Sheetname").select but this macro will be used to add more sheets in. Any Ideas? -- chalky ------------------------------------------------------------------------ chalky's Profile: http://www.excelforum.com/member.php...o&userid=23758 View this thread: http://www.excelforum.com/showthread...hreadid=563277 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Right One Sheet
Ah thank you very much -- chalk ----------------------------------------------------------------------- chalky's Profile: http://www.excelforum.com/member.php...fo&userid=2375 View this thread: http://www.excelforum.com/showthread.php?threadid=56327 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel sheet bootom half sheet goes behind top part of sheet | Excel Worksheet Functions | |||
Duplicate sheet, autonumber sheet, record data on another sheet | Excel Worksheet Functions | |||
How do I select price from sheet.b where sheet.a part no = sheet.b | Excel Worksheet Functions | |||
Copying cells from on sheet to another sheet (via sheet module) | Excel Programming | |||
Inserting a row in sheet A should Insert a row in sheet B, removing a row in Sheet A should remove the corresponding row in sheet B | Excel Programming |