ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I create a command button to jump from sheet to sheet in a. (https://www.excelbanter.com/excel-worksheet-functions/18805-how-do-i-create-command-button-jump-sheet-sheet.html)

Darlenew

How do I create a command button to jump from sheet to sheet in a.
 
Wud like to create a button to jump from sheet to sheet in a workbook, can
anyone help with this. I've gotten to inserting the button - and naming it,
then I'm lost
Want to click on the button and have it bring you to the reqired sheet. Can
anyone help with this.

ww

When you first create the button an assign macro box should pop up. Click
the Record button on the right side. A Record Macro box will appear just
click okay. Then just click on the sheets tab you want to jump to. Click on
a cell within the sheet you want to go to. If nothing specific just click on
A1. Then go ToolsMacrostop recording. Now if you click on your button back
on the other sheet it should jump to the new sheet.

Hope that works for you.

"Darlenew" wrote:

Wud like to create a button to jump from sheet to sheet in a workbook, can
anyone help with this. I've gotten to inserting the button - and naming it,
then I'm lost
Want to click on the button and have it bring you to the reqired sheet. Can
anyone help with this.


Bob Phillips

Assign this macro to the button, shift-button goes to the previous sheet,
normal click to the next sheet.


Declare Function GetKeyState Lib "user32" (ByVal fnKey As Long) As Integer

Const vkShift As Integer = &H10

Sub SetCalculateMode()
Dim nState As Long

If GetKeyState(vkShift) < 0 Then
If ActiveSheet.Index < 1 Then
ActiveSheet.Previous.Activate
End If
Else
If ActiveSheet.Index < ActiveWorkbook.Worksheets.Count Then
ActiveSheet.Next.Select
End If
End If
With Application.CommandBars.ActionControl
.State = nState
End With

End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Darlenew" wrote in message
...
Wud like to create a button to jump from sheet to sheet in a workbook, can
anyone help with this. I've gotten to inserting the button - and naming

it,
then I'm lost
Want to click on the button and have it bring you to the reqired sheet.

Can
anyone help with this.




Gord Dibben

May be just as easy to create a hyperlink to the other sheet in an unused
cell.

Right-click and "Hyperlink""Place in this Document".


Gord Dibben Excel MVP

On Tue, 22 Mar 2005 11:31:06 -0800, "Darlenew"
wrote:

Wud like to create a button to jump from sheet to sheet in a workbook, can
anyone help with this. I've gotten to inserting the button - and naming it,
then I'm lost
Want to click on the button and have it bring you to the reqired sheet. Can
anyone help with this.




All times are GMT +1. The time now is 10:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com