View Single Post
  #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!