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!
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!
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" <KenVo@discussions.microsoft.com> wrote in message
news:873F05AB-9E1B-4322-8737-93DEDDFA779D@microsoft.com...
>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!
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" <KenVo@discussions.microsoft.com> wrote in message
> news:873F05AB-9E1B-4322-8737-93DEDDFA779D@microsoft.com...
> >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!
>
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks