CommandButton to open a Excel workbook



I have a command button that when clicked goes to another Worksheet. Can this
command button code be edited to goto another WorkBook instead?

Private Sub CommandButton1_Click()
Worksheets("HoursWorked").Select
Application.Goto Worksheets("HoursWorked").Range("A1"), Scroll:=True 'or
false??
End Sub
.



Relevant Pages

  • Re: Searcing for an Excel event.
    ... Public WithEvents App As Application ... Private Sub App_SheetActivate ... 'This is workbook event code. ... I have created a Excel command bar and created some command butttons ...
    (microsoft.public.excel.programming)
  • Re: VBA code to send click command to a macro in a different Excel workbook
    ... commandbutton on a different worksheet in the SAME workbook). ... Private Sub George_Click ... I wish to write code in VBA to, in effect, remotely click a command button on a different worksheet. ... I have a workbook with macros. ...
    (microsoft.public.excel.programming)
  • Re: Universal CommandButtons Accross Worksheets
    ... Private Sub Workbook_Deactivate ... try to use the commands it automatically opens the original workbook. ... Right now I have six command buttons and 485 lines of code for Just One ... buttons into everyworks sheet and then configure every button like this... ...
    (microsoft.public.excel.programming)
  • Re: Command Bar Woes
    ... Private Sub Workbook_Deactivate ... | only with a specific worksheet in a specific workbook. ... Each command ... more and more workbooks have their own custom command bars to ...
    (microsoft.public.excel.programming)
  • Re: Protecting a workbook
    ... before your save command ... > I've had people diddling in the workbook by pressing "disable macros" ... > on close, without prompting the user. ... > Private Sub Workbook_BeforeClose ...
    (microsoft.public.excel.programming)