Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I know that there is Ctrl+PageUp + Ctrl+PageDown to navigation/browse
back and forth in a workbook but couldn't find anything via google re a hotkey to go to first and last sheets. If there isn't anything, thought that a macro would do. If no hotkey, thought that something like this might work: Sub GOto_First_Sheet_in_Workbook() Sheets("Worksheets(1)").Activate End Sub But I don't know how to type in the generic name for the first sheet. I believe I've used Worksheets(1) in other cases but this isn't working here and I can't find what to do to go to the last sheet, also using a generic term rather than a specific sheet name. This way I can put this into my PERSONAL.xls. Thanks! :oD |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I know that there is Ctrl+PageUp + Ctrl+PageDown to navigation/browse
back and forth in a workbook but couldn't find anything via google re a hotkey to go to first and last sheets. If there isn't anything, thought that a macro would do. If no hotkey, thought that something like this might work: Sub GOto_First_Sheet_in_Workbook() Sheets("Worksheets(1)").Activate End Sub But I don't know how to type in the generic name for the first sheet. I believe I've used Worksheets(1) in other cases but this isn't working here and I can't find what to do to go to the last sheet, also using a generic term rather than a specific sheet name. This way I can put this into my PERSONAL.xls. Sub Goto_Last_Sheet_in_Workbook() Sheets(Sheets.Count).Activate End Sub Sub Goto_First_Sheet_in_Workbook() Sheets(1).Activate End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Jun 2, 9:38*pm, wrote:
Sub GOto_First_Sheet_in_Workbook() * * Sheets("Worksheets(1)").Activate End Sub I prefer the Application.Goto method for changing sheet and position as the scroll option gives better visual feedback Sub GotoFirst() Application.Goto Sheets(1).Range("A1") End Sub Sub GotoLast() Application.Goto Sheets(Sheets.Count).Range("A1") End Sub |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
... as the scroll option gives better visual feedback
??? I couldn't see any difference, visually. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Jun 2, 10:54*pm, "IanKR" wrote:
... as the scroll option gives better visual feedback ??? I couldn't see any difference, visually. Ah, yes. Err, I forgot the Scroll option. Application.Goto Sheets(Sheets.Count).Range("A1"), True |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
... as the scroll option gives better visual feedback
??? I couldn't see any difference, visually. Ah, yes. Err, I forgot the Scroll option. Application.Goto Sheets(Sheets.Count).Range("A1"), True Apart for going to cell A1 on the sheet (as opposed to just activating the sheet) (which is useful, but not necessarily what the OP requested), I still can't see any difference. Unless I'm missing something mind-bogglingly obvious. |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
... as the scroll option gives better visual feedback
??? I couldn't see any difference, visually. Ah, yes. Err, I forgot the Scroll option. Application.Goto Sheets(Sheets.Count).Range("A1"), True Apart for going to cell A1 on the sheet (as opposed to just activating the sheet) (which is useful, but not necessarily what the OP requested), I still can't see any difference. Unless I'm missing something mind-bogglingly obvious. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
find "Cancellation" in column "A" and copy all data from Columns B-F onto another Sheet | Excel Programming | |||
Display "Activate" dialog from sheet navigation context menu | Excel Programming | |||
Change default in input box from "20" to "000000"? Have macro continue on to name sheet tab? | Excel Programming | |||
Prevent code in "Sheet Activate" from running when sheet made visible from other macr | Excel Programming | |||
Please add a "sheet" function like "row" and "column" functions | Excel Programming |