Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ken Vo
 
Posts: n/a
Default Command button and linking with other sheets in the workbooks

I am trying to make a command button that if clicked will jump the user to
another sheet and/or file. (e.g. if "Inspection" button is clicked it will
jump to the Inspection sheet in the same workbook. Help me please. Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
Norman Jones
 
Posts: n/a
Default Command button and linking with other sheets in the workbooks

Hi Ken,

Try:

'=============
Private Sub CommandButton1_Click()
Dim WB As Workbook
Dim SH As Worksheet

Set WB = ThisWorkbook
Set SH = WB.Sheets("Inspection")
SH.Activate
End Sub
'<<=============

To activate a sheet in another (open) workbook, replace:


Set WB = ThisWorkbook

with

SetWB = Workbooks("OtherWorkbook.xls")


---
Regards,
Norman


"Ken Vo" wrote in message
...
I am trying to make a command button that if clicked will jump the user to
another sheet and/or file. (e.g. if "Inspection" button is clicked it will
jump to the Inspection sheet in the same workbook. Help me please. Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.misc
Ken Vo
 
Posts: n/a
Default Command button and linking with other sheets in the workbooks

Thanks for your help Norman, but it didnt work.

"Norman Jones" wrote:

Hi Ken,

Try:

'=============
Private Sub CommandButton1_Click()
Dim WB As Workbook
Dim SH As Worksheet

Set WB = ThisWorkbook
Set SH = WB.Sheets("Inspection")
SH.Activate
End Sub
'<<=============

To activate a sheet in another (open) workbook, replace:


Set WB = ThisWorkbook

with

SetWB = Workbooks("OtherWorkbook.xls")


---
Regards,
Norman


"Ken Vo" wrote in message
...
I am trying to make a command button that if clicked will jump the user to
another sheet and/or file. (e.g. if "Inspection" button is clicked it will
jump to the Inspection sheet in the same workbook. Help me please. Thanks!




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
Linking WorkBOOKS across directories maurices5000 Excel Worksheet Functions 1 December 16th 05 09:41 PM
Linking sheets between workbooks... Chris Links and Linking in Excel 12 June 28th 05 02:27 PM
linking to multiple workbooks cwwolfdog Excel Discussion (Misc queries) 4 April 18th 05 05:29 PM
Linking Workbooks Dede McEachern Excel Worksheet Functions 0 January 21st 05 08:27 PM
Linking sheets to a summary sheet in workbook gambinijr Excel Discussion (Misc queries) 4 December 16th 04 08:13 PM


All times are GMT +1. The time now is 07: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"