Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 587
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 621
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
select worksheet and run macro Hammah Excel Programming 7 February 1st 12 01:03 AM
why does this macro select the entire worksheet when run? Dave F Excel Discussion (Misc queries) 6 March 1st 07 01:19 PM
Using Macro to Select Worksheet samothman Excel Programming 1 September 1st 06 01:55 PM
select worksheet to run macro Hidaya Excel Discussion (Misc queries) 5 December 1st 04 11:54 PM
Help Please! Macro Error on Select Worksheet Apressler Excel Programming 1 September 23rd 04 04:58 PM


All times are GMT +1. The time now is 05:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"