How do I create a command button to jump from sheet to sheet in a.

D

Darlenew

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.
 
W

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 Tools>Macro>stop 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.
 
B

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)
 
G

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top