ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   macro to select worksheet (https://www.excelbanter.com/excel-programming/445387-macro-select-worksheet.html)

kalpesh

macro to select worksheet
 
Hello,

my workbook contain many worksheet

i want to create a macro in sheet1 to select other worksheet

e.g.

when click command button go to the worksheet2

how possible it

isabelle

macro to select worksheet
 
hi,

you can use a hyperlink


Sub Macro1()
For i = 2 To Sheets.Count
Sheets(1).Hyperlinks.Add Anchor:=Range("A" & i), _
Address:="", SubAddress:=Sheets(i).Name & "!A1", TextToDisplay:=Sheets(i).Name & "!A1"
Next
End Sub



--
isabelle



Le 2012-02-15 12:01, kalpesh a écrit :
Hello,

my workbook contain many worksheet

i want to create a macro in sheet1 to select other worksheet

e.g.

when click command button go to the worksheet2

how possible it


Gord Dibben[_2_]

macro to select worksheet
 
Right-click on the navigation arrows at bottom left to get a list of
15 sheets and "more sheets".


Rather than hyperlinks, try a sheet navigation toolbar or similar.


Sheet navigation bar from by Dave Peterson at Debra Dalgleish's site.


http://www.contextures.on.ca/xlToolbar01.html


Or Bob Phillips' Browsesheets macro.


See this google search result.


http://tinyurl.com/yoa3dw



Gord




On Wed, 15 Feb 2012 11:01:16 -0600, kalpesh
wrote:

Hello,

my workbook contain many worksheet

i want to create a macro in sheet1 to select other worksheet

e.g.

when click command button go to the worksheet2

how possible it


Don Guillett[_2_]

macro to select worksheet
 
or one I have used from a name of the sheet in a cell. You can do a
macro to list the sheets, if desired.
'
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
Application.DisplayAlerts = False
Dim WantedSheet As String
WantedSheet = Trim(ActiveCell.Value)
If WantedSheet = "" Then Exit Sub
On Error Resume Next
If Sheets(WantedSheet) Is Nothing Then
GetWorkbook ' calls another macro to do that
Else
Application.GoTo Sheets(WantedSheet).Range("a4")
End If
Application.DisplayAlerts = True
End Sub


On Feb 15, 2:08*pm, Gord Dibben wrote:
Right-click on the navigation arrows at bottom left to get a list of
15 sheets and "more sheets".

Rather than hyperlinks, try a sheet navigation toolbar or similar.

Sheet navigation bar from by Dave Peterson at Debra Dalgleish's site.

http://www.contextures.on.ca/xlToolbar01.html

Or Bob Phillips' Browsesheets macro.

See this google search result.

http://tinyurl.com/yoa3dw

Gord

On Wed, 15 Feb 2012 11:01:16 -0600, kalpesh







wrote:
Hello,


my workbook contain many worksheet


i want to create a macro in sheet1 to select other worksheet


e.g.


when click command button go to the worksheet2


how possible it




All times are GMT +1. The time now is 10:16 AM.

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